-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Prevent fallback assert postprocessor being passed to CUDA and HIP devices #4604
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
Conversation
Could you please clarify if this patch is a workaround until the issue is root caused and a proper solution found or a final solution? Do we know what the root cause is? |
The root cause is that target macro's like This is proposed as a long-term solution until CUDA and HIP support fallback asserts. |
Even though it was passed for CUDA device, it converted was sort of a NOP due CUDA backend reported support for native assert. See the change in #3767 |
Ahh, thanks for explaining. I was wondering why CUDA devices were not failing. |
@AidanBeltonS , could you, then, modify the HIP plugin to report assert being supported? This will remain {{queue.hpp}} back-end agnostic. |
I have tested adding Currently HIP4.3 does not support asserts natively. Though it seems that it will soon. Are okay with adding the extension regardless of HIPs support? I can comment that this is being used resolve this issue and add a note to remove the comment once native asserts are supported. From HIP 4.3 docs
|
@smaslov-intel, @romanovvlad, @s-kanaev, ping. |
@s-kanaev, ping. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems legit
This patch fixes an error with HIP backend where tests DeviceCodeSplit/split-per-kernel.cpp and DeviceCodeSplit/split-per-source-main.cpp fail with
Memory access fault by GPU node-4 (Agent handle: 0x709c50) on address (nil). Reason: Page not present or supervisor privilege.
This is due to a postprocessor being sent to
queue_impl::submit_impl
.The patch add checks to
queue.hpp
so postprocessors needed for fallback assert do not get passed for HIP and CUDA devices. Neither currently support fallback asserts.Note: adding
__AMDGCN__
towas not a fix as a new error arose in its place. Investigation showed that macros
__AMDGCN__
and__NVPTX__
are only set for device compilation and as a result did not stop preprocessors being passed tosubmit_impl
. I think the postprocesor was not supposed to be passed to CUDA devices. Despite being passed it was not causing an error for CUDA just HIP.