Skip to content

[SYCL][UR] Link UR PI against UR Loader #8637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 24, 2023
Merged

Conversation

bmyates
Copy link
Contributor

@bmyates bmyates commented Mar 13, 2023

Compile UR L0 adapter as a standalone library

Signed-off-by: Brandon Yates brandon.yates@intel.com

@bmyates bmyates requested a review from a team as a code owner March 13, 2023 22:10
@bmyates bmyates requested a review from dm-vodopyanov March 13, 2023 22:10
@bmyates bmyates temporarily deployed to aws March 13, 2023 22:38 — with GitHub Actions Inactive
@bmyates bmyates temporarily deployed to aws March 13, 2023 23:28 — with GitHub Actions Inactive
@bmyates bmyates temporarily deployed to aws March 15, 2023 01:03 — with GitHub Actions Inactive
@bmyates bmyates requested a review from a team as a code owner March 16, 2023 01:02
@bmyates bmyates temporarily deployed to aws March 16, 2023 01:11 — with GitHub Actions Inactive
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this new file used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The UR loader calls these functions to build the DDI tables.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bmyates this is the extra level of indirection that we dont want to have when there's only one adapter, right? that optimization could be done in a follow-up patch,.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No the extra level of indirection will be removed in the loader. No change to make to code here.

Copy link
Contributor

@jandres742 jandres742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@bmyates bmyates temporarily deployed to aws March 16, 2023 17:04 — with GitHub Actions Inactive
Copy link
Contributor

@smaslov-intel smaslov-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bmyates bmyates temporarily deployed to aws March 16, 2023 17:45 — with GitHub Actions Inactive
@bmyates bmyates temporarily deployed to aws March 16, 2023 23:29 — with GitHub Actions Inactive
@bmyates bmyates temporarily deployed to aws March 17, 2023 00:01 — with GitHub Actions Inactive
@bmyates bmyates temporarily deployed to aws March 20, 2023 21:36 — with GitHub Actions Inactive
@bmyates bmyates closed this Mar 20, 2023
@bmyates bmyates reopened this Mar 20, 2023
@bmyates bmyates temporarily deployed to aws March 20, 2023 22:42 — with GitHub Actions Inactive
@jandres742
Copy link
Contributor

@bader : do you know what could be happening with the CI here?

Compile UR L0 adapter as a standalone library

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
@bmyates bmyates temporarily deployed to aws March 21, 2023 15:46 — with GitHub Actions Inactive
@bmyates bmyates temporarily deployed to aws March 21, 2023 17:38 — with GitHub Actions Inactive
@bmyates
Copy link
Contributor Author

bmyates commented Mar 21, 2023

@bader : do you know what could be happening with the CI here?

CI works perfectly fine. This is a bug in CMake files. It should be fixed by c39de71. Please, update your branch.

I rebased and fixed that issue, but now failing with another issue that seems unrelated. Any idea @bader
/usr/bin/ld: /tmp/lit-tmp-8505fbty/level_zero_imm_cmdlist_per_thread-d70b3a.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5

@bader
Copy link
Contributor

bader commented Mar 21, 2023

@bader : do you know what could be happening with the CI here?

CI works perfectly fine. This is a bug in CMake files. It should be fixed by c39de71. Please, update your branch.

I rebased and fixed that issue, but now failing with another issue that seems unrelated. Any idea @bader /usr/bin/ld: /tmp/lit-tmp-8505fbty/level_zero_imm_cmdlist_per_thread-d70b3a.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5

No idea.

@bmyates bmyates closed this Mar 22, 2023
@bmyates bmyates reopened this Mar 22, 2023
@bmyates
Copy link
Contributor Author

bmyates commented Mar 22, 2023

@bader : do you know what could be happening with the CI here?

CI works perfectly fine. This is a bug in CMake files. It should be fixed by c39de71. Please, update your branch.

I rebased and fixed that issue, but now failing with another issue that seems unrelated. Any idea @bader /usr/bin/ld: /tmp/lit-tmp-8505fbty/level_zero_imm_cmdlist_per_thread-d70b3a.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5

This was caused by a bug in sycl tests that was fixed yesterday intel/llvm-test-suite#1674

Retriggered CI here, fingers crossed it passes this time.

@bmyates bmyates temporarily deployed to aws March 22, 2023 14:15 — with GitHub Actions Inactive
@bmyates bmyates temporarily deployed to aws March 22, 2023 15:45 — with GitHub Actions Inactive
@bmyates
Copy link
Contributor Author

bmyates commented Mar 22, 2023

@smaslov-intel @bader all checks finally passed, needs reapproval now

@bader bader requested a review from smaslov-intel March 22, 2023 22:17
Copy link
Contributor

@bader bader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor style comments.

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
@bmyates bmyates temporarily deployed to aws March 23, 2023 19:39 — with GitHub Actions Inactive
@smaslov-intel
Copy link
Contributor

@bmyates : we expect a clean CI run, unless there is something known that @intel/llvm-gatekeepers would be aware of.
All failures need to be tracked (with either a PR to temporarily disabling failed tests, or a PR that fixes the test or compiler)
@intel/llvm-gatekeepers, is this a known issue:

pi_die: Unknown parameter 4533 passed to hip_piKernelGetGroupInfo

@bmyates bmyates temporarily deployed to aws March 23, 2023 22:17 — with GitHub Actions Inactive
@bader
Copy link
Contributor

bader commented Mar 23, 2023

@bmyates : we expect a clean CI run, unless there is something known that @intel/llvm-gatekeepers would be aware of. All failures need to be tracked (with either a PR to temporarily disabling failed tests, or a PR that fixes the test or compiler)

👍
That's right. In case of PR disabling failed test, we also expect an issue to re-enable the test back.

@intel/llvm-gatekeepers, is this a known issue:

pi_die: Unknown parameter 4533 passed to hip_piKernelGetGroupInfo

I think @bmyates is right and this is a regression introduced by intel/llvm-test-suite@a92d98e. I see similar failure in #8708 pre-commits.

@bader bader merged commit a0d0942 into intel:sycl Mar 24, 2023
@bader
Copy link
Contributor

bader commented Mar 24, 2023

@bmyates, could you fix, please?

/home/runner/work/llvm/llvm/src/sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero.cpp:1745:43: error: unused parameter 'device_flags' [-Werror,-Wunused-parameter]
ur_result_t urInit(ur_device_init_flags_t device_flags) {
                                          ^
/home/runner/work/llvm/llvm/src/sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero.cpp:1749:30: error: unused parameter 'pParams' [-Werror,-Wunused-parameter]
ur_result_t urTearDown(void *pParams) { return UR_RESULT_SUCCESS; }
                             ^
2 errors generated.

whitneywhtsang added a commit to whitneywhtsang/llvm that referenced this pull request Mar 25, 2023
bader added a commit that referenced this pull request Mar 27, 2023
bader added a commit that referenced this pull request Mar 27, 2023
Reverts #8637

It caused at least 3 known regressions.

1. #8637 (comment)
2.
\sycl\plugins\unified_runtime\ur\adapters\level_zero\ur_level_zero_common.hpp(10):
fatal error C1083: Cannot open include file: 'sycl/detail/pi.h': No such
file or directory
3. ld: error: undefined symbol: pthread_rwlock_wrlock (with GCC 7.5)
veselypeta pushed a commit to veselypeta/llvm that referenced this pull request Sep 21, 2023
Compile UR L0 adapter as a standalone library

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
veselypeta pushed a commit to veselypeta/llvm that referenced this pull request Sep 21, 2023
Reverts intel#8637

It caused at least 3 known regressions.

1. intel#8637 (comment)
2.
\sycl\plugins\unified_runtime\ur\adapters\level_zero\ur_level_zero_common.hpp(10):
fatal error C1083: Cannot open include file: 'sycl/detail/pi.h': No such
file or directory
3. ld: error: undefined symbol: pthread_rwlock_wrlock (with GCC 7.5)
omarahmed1111 pushed a commit to omarahmed1111/unified-runtime that referenced this pull request Oct 23, 2023
Reverts intel/llvm#8637

It caused at least 3 known regressions.

1. intel/llvm#8637 (comment)
2.
\sycl\plugins\unified_runtime\ur\adapters\level_zero\ur_level_zero_common.hpp(10):
fatal error C1083: Cannot open include file: 'sycl/detail/pi.h': No such
file or directory
3. ld: error: undefined symbol: pthread_rwlock_wrlock (with GCC 7.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants