-
Notifications
You must be signed in to change notification settings - Fork 795
[SYCL][HIP] Disable partial global offset support #4905
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This patch is disabling global offset support for the HIP plugin. The existing `libclc` implementation for `__spirv_GlobalOffset_x()` was using the HIP implicit args system, but these are not currently setup by `clang` nor by the HIP plugin when running with SYCL. Additionally the global offset is used when computing the global id, which means that even in kernels that don't use global offsets the kernel would still read a global offset from the uninitialized implicit args, which in some cases would cause crashes. Additionaly the HIP plugin is trying to mimick the CUDA plugin behaviour, but the PTX backend has an extra IR pass to generate a specific wrapper for kernels using global offsets, which is not part of the AMDGCN compilation pipeline so when using a global offset different from 0, the HIP plugin would just try to call a non-existant kernel. So this patch is adding an assert in the HIP plugin when trying to use global offsets different from 0, and forces the global offsets to be 0 in the kernel, until we implement proper support for global offsets.
a9e9be1
to
fc61fb8
Compare
This patch fixes running the BabelStream benchmark with DPC++ and the HIP plugin, as well as quite a few
I'll open a PR to the |
npmiller
added a commit
to npmiller/llvm-test-suite
that referenced
this pull request
Nov 10, 2021
These tests have been fixed as part of: intel/llvm#4905
vladimirlaz
approved these changes
Nov 11, 2021
bader
approved these changes
Nov 16, 2021
@againull, @smaslov-intel, ping. |
smaslov-intel
approved these changes
Nov 16, 2021
vladimirlaz
pushed a commit
to intel/llvm-test-suite
that referenced
this pull request
Nov 17, 2021
These tests have been fixed as part of: intel/llvm#4905
aelovikov-intel
pushed a commit
to aelovikov-intel/llvm
that referenced
this pull request
Mar 27, 2023
…tel/llvm-test-suite#564) These tests have been fixed as part of: intel#4905
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch is disabling global offset support for the HIP plugin.
The existing
libclc
implementation for__spirv_GlobalOffset_x()
wasusing the HIP implicit args system, but these are not currently setup by
clang
nor by the HIP plugin when running with SYCL.Additionally the global offset is used when computing the global id,
which means that even in kernels that don't use global offsets the
kernel would still read a global offset from the uninitialized implicit
args, which in some cases would cause crashes.
Additionaly the HIP plugin is trying to mimick the CUDA plugin
behaviour, but the PTX backend has an extra IR pass to generate a
specific wrapper for kernels using global offsets, which is not part of
the AMDGCN compilation pipeline so when using a global offset different
from 0, the HIP plugin would just try to call a non-existant kernel.
So this patch is adding an assert in the HIP plugin when trying to use
global offsets different from 0, and forces the global offsets to be 0
in the kernel, until we implement proper support for global offsets.