[clang] clang: Remove unnecessary host-supports-cuda from test (PR #171174)

2025-12-17 Thread Matt Arsenault via cfe-commits

https://github.com/arsenm closed 
https://github.com/llvm/llvm-project/pull/171174
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] clang: Remove unnecessary host-supports-cuda from test (PR #171174)

2025-12-08 Thread Sean Perry via cfe-commits

perry-ca wrote:

Thanks for the changes.  I applied the change to the wrapper to include 
``.  That solved the compile error when running the clang command.  I 
appear to have a single target build as running the test with llvm-lit is 
giving unsupported as the result.  I'll rebuild and try llvm-lit again.

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.

https://github.com/llvm/llvm-project/pull/171174
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] clang: Remove unnecessary host-supports-cuda from test (PR #171174)

2025-12-08 Thread Matt Arsenault via cfe-commits

arsenm wrote:

> This test will fail on z/OS without a resource requirement for cuda. I get 
> these errors when running this test:
> 
> ```
> clang: warning: argument unused during compilation: '-c' 
> [-Wunused-command-line-argument]
> In file included from :1:
> In file included from ./../../lib/Headers/__clang_cuda_runtime_wrapper.h:158:
> ./../../lib/Headers/__clang_cuda_math.h:284:13: error: use of undeclared 
> identifier 'INT_MAX'
>   284 |   if (__b > INT_MAX)
>   | ^~~
> ./../../lib/Headers/__clang_cuda_math.h:286:13: error: use of undeclared 
> identifier 'INT_MIN'
>   286 |   if (__b < INT_MIN)
>   | ^~~
> ./../../lib/Headers/__clang_cuda_math.h:291:13: error: use of undeclared 
> identifier 'INT_MAX'
>   291 |   if (__b > INT_MAX)
>   | ^~~
> ./../../lib/Headers/__clang_cuda_math.h:293:13: error: use of undeclared 
> identifier 'INT_MIN'
>   293 |   if (__b < INT_MIN)
>   | ^~~
> 4 errors generated when compiling for sm_52.
> ```
> 

Looks like a missing limits.h include in __clang_cuda_runtime_wrapper.h?

> Is there a better resource to require? 
This shouldn't require any host resource

> This does require the the target support cuda.

No it doesn't, the extent that Cuda is required is the fake path to the headers



https://github.com/llvm/llvm-project/pull/171174
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] clang: Remove unnecessary host-supports-cuda from test (PR #171174)

2025-12-08 Thread Sean Perry via cfe-commits

perry-ca wrote:

I noticed the test case includes real system headers (see the option `-isystem 
%S/../../lib/Headers`) and not platform independent stubs.  That makes the lit 
test highly unportable.

https://github.com/llvm/llvm-project/pull/171174
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] clang: Remove unnecessary host-supports-cuda from test (PR #171174)

2025-12-08 Thread Sean Perry via cfe-commits

perry-ca wrote:

This test will fail on z/OS without a resource requirement for cuda.   I get 
these errors when running this test:
```
clang: warning: argument unused during compilation: '-c' 
[-Wunused-command-line-argument]
In file included from :1:
In file included from ./../../lib/Headers/__clang_cuda_runtime_wrapper.h:158:
./../../lib/Headers/__clang_cuda_math.h:284:13: error: use of undeclared 
identifier 'INT_MAX'
  284 |   if (__b > INT_MAX)
  | ^~~
./../../lib/Headers/__clang_cuda_math.h:286:13: error: use of undeclared 
identifier 'INT_MIN'
  286 |   if (__b < INT_MIN)
  | ^~~
./../../lib/Headers/__clang_cuda_math.h:291:13: error: use of undeclared 
identifier 'INT_MAX'
  291 |   if (__b > INT_MAX)
  | ^~~
./../../lib/Headers/__clang_cuda_math.h:293:13: error: use of undeclared 
identifier 'INT_MIN'
  293 |   if (__b < INT_MIN)
  | ^~~
4 errors generated when compiling for sm_52.
```

Is there a better resource to require?  This does require the the target 
support cuda.

https://github.com/llvm/llvm-project/pull/171174
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] clang: Remove unnecessary host-supports-cuda from test (PR #171174)

2025-12-08 Thread Joseph Huber via cfe-commits

https://github.com/jhuber6 approved this pull request.

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

https://github.com/llvm/llvm-project/pull/171174
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] clang: Remove unnecessary host-supports-cuda from test (PR #171174)

2025-12-08 Thread Matt Arsenault via cfe-commits

arsenm wrote:

This came from 6106b9473d980dcda5c92edd3944882232fa58aa but is the wrong 
condition, I can't guess what zos actually cares about 

https://github.com/llvm/llvm-project/pull/171174
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] clang: Remove unnecessary host-supports-cuda from test (PR #171174)

2025-12-08 Thread Artem Belevich via cfe-commits

https://github.com/Artem-B approved this pull request.


https://github.com/llvm/llvm-project/pull/171174
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] clang: Remove unnecessary host-supports-cuda from test (PR #171174)

2025-12-08 Thread Artem Belevich via cfe-commits

Artem-B wrote:

The change looks OK to me, but I don't have enough context to tell if there's 
something special about OpenMP parts. 
@jhuber6 may be the best person to stamp this PR.

https://github.com/llvm/llvm-project/pull/171174
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] clang: Remove unnecessary host-supports-cuda from test (PR #171174)

2025-12-08 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang

Author: Matt Arsenault (arsenm)


Changes



---
Full diff: https://github.com/llvm/llvm-project/pull/171174.diff


1 Files Affected:

- (modified) clang/test/Headers/cuda_with_openmp.cu (+1-1) 


``diff
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
 

``




https://github.com/llvm/llvm-project/pull/171174
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] clang: Remove unnecessary host-supports-cuda from test (PR #171174)

2025-12-08 Thread Matt Arsenault via cfe-commits

https://github.com/arsenm ready_for_review 
https://github.com/llvm/llvm-project/pull/171174
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] clang: Remove unnecessary host-supports-cuda from test (PR #171174)

2025-12-08 Thread Matt Arsenault via cfe-commits

arsenm wrote:

* **#171174** https://app.graphite.com/github/pr/llvm/llvm-project/171174?utm_source=stack-comment-icon";
 target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" 
width="10px" height="10px"/> 👈 https://app.graphite.com/github/pr/llvm/llvm-project/171174?utm_source=stack-comment-view-in-graphite";
 target="_blank">(View in Graphite)
* `main`




This stack of pull requests is managed by https://graphite.dev?utm-source=stack-comment";>Graphite. Learn 
more about https://stacking.dev/?utm_source=stack-comment";>stacking.


https://github.com/llvm/llvm-project/pull/171174
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] clang: Remove unnecessary host-supports-cuda from test (PR #171174)

2025-12-08 Thread Matt Arsenault via cfe-commits

https://github.com/arsenm created 
https://github.com/llvm/llvm-project/pull/171174

None

>From 48a06fb0f38892604bd247c4956894e5ec898753 Mon Sep 17 00:00:00 2001
From: Matt Arsenault 
Date: Mon, 8 Dec 2025 19:20:25 +0100
Subject: [PATCH] clang: Remove unnecessary host-supports-cuda from test

---
 clang/test/Headers/cuda_with_openmp.cu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
 

___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits