-
Notifications
You must be signed in to change notification settings - Fork 759
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
[SYCL] Move driver related __CUDA_ARCH__
test to Driver folder from Preprocessor
#15521
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Verify the __CUDA_ARCH__ macro has not been defined when offloading SYCL on NVPTX | ||
// RUN: %clangxx -E -dM -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --offload-arch=sm_80 -nocudalib -fno-sycl-libspirv %s 2>&1 \ | ||
// RUN: | FileCheck --check-prefix=CHECK-CUDA-ARCH-MACRO %s | ||
// CHECK-CUDA-ARCH-MACRO-NOT: #define __CUDA_ARCH__ {{[0-9]+}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given the original nature of the driver change, one thing we should also verify is that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mdtoguchi Thanks for being rigorous here! That's definitely what the original change prevented, where the unwanted macro was a product of this. I've added the test and updated the PR description accordingly. |
||
|
||
// Verify that '-fcuda-is-device' is not supplied when offloading SYCL on NVPTX | ||
// RUN: %clangxx -### -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --offload-arch=sm_80 -nocudalib -fno-sycl-libspirv %s 2>&1 \ | ||
// RUN: | FileCheck --check-prefix=CHECK-CUDA-IS-DEVICE %s | ||
// CHECK-CUDA-IS-DEVICE: clang{{.*}} "-cc1" "-triple" "nvptx64-nvidia-cuda" | ||
// CHECK-CUDA-IS-DEVICE-NOT: "-fcuda-is-device" | ||
// CHECK-CUDA-IS-DEVICE-SAME: "-fsycl-is-device" |
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.
Are AMDGPU targets covered by other tests? FYI: #15544
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.
Thanks for catching this. I had noticed the macro being defined in the HIP toolchain at the time of fixing the regression for the Cuda flow. It isn't tested correctly.
I made a draft PR (here #15443) for HIP-AMDGPU right after the Cuda one and I was planning to make it ready for review after this gets merged. Seems others caught it too in the meantime. I'll add a sycl clang driver for AMDGPU targets here as part of the said PR.