-
Notifications
You must be signed in to change notification settings - Fork 15.4k
clang: Remove unnecessary host-supports-cuda from test #171174
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
base: main
Are you sure you want to change the base?
clang: Remove unnecessary host-supports-cuda from test #171174
Conversation
|
@llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Matt Arsenault (arsenm) ChangesFull diff: https://github.com/llvm/llvm-project/pull/171174.diff 1 Files Affected:
diff --git a/clang/test/Headers/cuda_with_openmp.cu b/clang/test/Headers/cuda_with_openmp.cu
index 8ea0de5972ff2..efde4ecdc6626 100644
--- a/clang/test/Headers/cuda_with_openmp.cu
+++ b/clang/test/Headers/cuda_with_openmp.cu
@@ -2,7 +2,7 @@
// Reported in https://bugs.llvm.org/show_bug.cgi?id=48014
///==========================================================================///
-// REQUIRES: nvptx-registered-target, host-supports-cuda
+// REQUIRES: nvptx-registered-target
// RUN: %clang -x cuda -fopenmp -c %s -o - --cuda-path=%S/../Driver/Inputs/CUDA/usr/local/cuda -nocudalib -isystem %S/Inputs/include -isystem %S/../../lib/Headers -fsyntax-only
|
|
The change looks OK to me, but I don't have enough context to tell if there's something special about OpenMP parts. |
|
This came from 6106b94 but is the wrong condition, I can't guess what zos actually cares about |
jhuber6
left a comment
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.
Should work since we pass -nocudalib, probably just leftover so it's best to get rid of it. In the past I've tested stuff like this by just temporarily renaming my local CUDA installation so it wasn't found by default
|
This test will fail on z/OS without a resource requirement for cuda. I get these errors when running this test: Is there a better resource to require? This does require the the target support cuda. |
|
I noticed the test case includes real system headers (see the option |
Looks like a missing limits.h include in __clang_cuda_runtime_wrapper.h?
This shouldn't require any host resource
No it doesn't, the extent that Cuda is required is the fake path to the headers |
|
Another thing with this test is the -fopenmp option. z/OS doesn't support openmp. It at least needs a line saying unsupported when targeting z/OS. The problem with not using fake headers also needs to be addressed so testing other targets from z/OS works. |
Those aren't real system headers, that's pointing to clang/test/Headers/Inputs/ |
48a06fb to
b966209
Compare
It's actually |
|
Using explicit zOS run line demonstrates the host issue, so I added one of those, but the limits include is enough to fix it. This is still syntax only so the lack of codegen support shouldn't matter |
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
|
Thanks for the changes. I applied the change to the wrapper to include I don't think we need the other change to the .cu file. Won't that run the clang command twice if the user builds clang multi target. I think adding the climits solved the problem. |
It should still be running the one supported run line and skipping the other (plus it still depends on nvptx, so you need at least those 2)
Yes, it will run twice. It catches the missed limits include from the zos run line, which is better than waiting for a failure on a zos host |

No description provided.