-
Notifications
You must be signed in to change notification settings - Fork 798
[SYCL][CUDA] Skip target options when preprocessing. #4805
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
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.
LGTM overall
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.
Revoking the approval verbally (so as to avoid automation blocking). Could you please add a test for this (e.g. by extending clang/test/Driver/sycl-offload-nvptx.cpp
? Sorry for the initial haste with the review.
Co-authored-by: Artem Gindinson <artem.gindinson@intel.com>
My bad, sorry. Added now. |
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.
Many thanks, LGTM!
Looks like I was to hasty with the early return, there are tests that rely on the code happening afterwards. The problem is more fundamental and to do with the fact that not all actions get the default bound arch propagated. I'm closing this PR and will have to look into the bound arch more. |
With this patch the bound arch is correctly propagated through the phases: ``` +- 0: input, "./../tickets/dashE/woof.cpp", c++, (device-sycl, sm_50) +- 1: preprocessor, {0}, c++-cpp-output, (device-sycl, sm_50) +- 2: offload, "device-sycl (nvptx64-nvidia-cuda:sm_50)" {1}, c++-cpp-output | +- 3: input, "./../tickets/dashE/woof.cpp", c++, (host-sycl) | |- 4: compiler, {1}, none, (device-sycl, sm_50) | +- 5: offload, "host-sycl (x86_64-unknown-linux-gnu)" {3}, "device-sycl (nvptx64-nvidia-cuda:sm_50)" {4}, c++ | +- 6: append-footer, {5}, c++, (host-sycl) |- 7: preprocessor, {6}, c++-cpp-output, (host-sycl) 8: clang-offload-bundler, {2, 7}, c++-cpp-output, (host-sycl) ``` Previously the `compiler` phase (`4`) was lacking the bound arch, which is the root cause of #4758: ``` |- 4: compiler, {1}, none, (device-sycl) ``` Resolves: #4758 Previous discussion in: #4805
Resolves #4758