@@ -27,6 +27,8 @@
extern "C" {
#endif
+#if !defined(__CUDA_ARCH__)
+
sarnex wrote:
i just pushed a commit which attempts to implement this, please take a look,
thanks!
https://github.com/llvm/llvm-project/pull/128222
https://github.com/sarnex updated
https://github.com/llvm/llvm-project/pull/128222
>From 9a28fa5772d1e4da50e629b9f397d50dc74bfa7b Mon Sep 17 00:00:00 2001
From: "Sarnie, Nick"
Date: Thu, 17 Apr 2025 12:07:02 -0700
Subject: [PATCH] [clang][ARM] Define intrinsics guarded by __has_builtin on
all
@@ -27,6 +27,8 @@
extern "C" {
#endif
+#if !defined(__CUDA_ARCH__)
+
sarnex wrote:
thanks, ill try to implement this assuming it's relatively easy
https://github.com/llvm/llvm-project/pull/128222
___
cfe-commits ma
@@ -27,6 +27,8 @@
extern "C" {
#endif
+#if !defined(__CUDA_ARCH__)
+
rnk wrote:
> If we have to define them on non-windows targets anyways, perhaps a better
> fix is to let clang define them everywhere, and avoid this special case in
> the headers.
Yes, we
@@ -27,6 +27,8 @@
extern "C" {
#endif
+#if !defined(__CUDA_ARCH__)
+
sarnex wrote:
@rnk Ping on this, thx!
https://github.com/llvm/llvm-project/pull/128222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
@@ -27,6 +27,8 @@
extern "C" {
#endif
+#if !defined(__CUDA_ARCH__)
+
sarnex wrote:
@Artem-B Any recommendations on moving forward since we seem to be having
trouble getting the historical info on the change?
https://github.com/llvm/llvm-project/pull/128222
@@ -27,6 +27,8 @@
extern "C" {
#endif
+#if !defined(__CUDA_ARCH__)
+
Artem-B wrote:
@rnk Reid, would you happen to have an idea what's up with these builtins on
Windows?
https://github.com/llvm/llvm-project/pull/128222
__
@@ -27,6 +27,8 @@
extern "C" {
#endif
+#if !defined(__CUDA_ARCH__)
+
sarnex wrote:
@compnerd @Bigcheese Ping x2, thanks!
https://github.com/llvm/llvm-project/pull/128222
___
cfe-commits mailing list
cfe-commits@lis
@@ -27,6 +27,8 @@
extern "C" {
#endif
+#if !defined(__CUDA_ARCH__)
+
sarnex wrote:
@compnerd @Bigcheese Do you mind taking a look at Artem's questions above? Thx
https://github.com/llvm/llvm-project/pull/128222
___
https://github.com/sarnex edited
https://github.com/llvm/llvm-project/pull/128222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -27,6 +27,8 @@
extern "C" {
#endif
+#if !defined(__CUDA_ARCH__)
+
Artem-B wrote:
```
#if __CUDA_ARCH__
// Make sure the declarations here are in sync with the functions provided
under #else.
#else
#endif
```
https://github.com/llvm/llvm-project/pull/1
@@ -27,6 +27,8 @@
extern "C" {
#endif
+#if !defined(__CUDA_ARCH__)
+
Artem-B wrote:
I'm actually wondering if the header needs `__has_builtin()`... They are coming
from the same compiler, and, if they are missing, they are declared in terms of
`__builtin*()
https://github.com/sarnex edited
https://github.com/llvm/llvm-project/pull/128222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -27,6 +27,8 @@
extern "C" {
#endif
+#if !defined(__CUDA_ARCH__)
+
sarnex wrote:
Do you mean we unconditionally define declarations, regardless of compilation
mode or `__has_builtin` result?
https://github.com/llvm/llvm-project/pull/128222
___
@@ -27,6 +27,8 @@
extern "C" {
#endif
+#if !defined(__CUDA_ARCH__)
+
Artem-B wrote:
Unfortunately, this will be observable to any code that happens to need those
builtins, and they are actually not provided by the compiler (i.e.
`__has_builtin(__wfi)` would
https://github.com/jhuber6 approved this pull request.
Maybe a comment for why we need to check for the CUDA arch, but I'll defer to
@Artem-B for the final +1.
https://github.com/llvm/llvm-project/pull/128222
___
cfe-commits mailing list
cfe-commits@l
https://github.com/sarnex updated
https://github.com/llvm/llvm-project/pull/128222
>From b91e429ae1fc1cf8ea8239aba59789013961533c Mon Sep 17 00:00:00 2001
From: "Sarnie, Nick"
Date: Fri, 21 Feb 2025 11:50:48 -0800
Subject: [PATCH 1/2] [Clang][ARM] Only try to redefine builtins for non-CUDA
Sig
@@ -27,6 +27,8 @@
extern "C" {
#endif
+#if !defined(__CUDA__)
sarnex wrote:
Ah sorry, I didn't double-check the suggestion from
[here](https://github.com/llvm/llvm-project/pull/121839#issuecomment-2617005659),
will fix.
https://github.com/llvm/llvm-project
@@ -27,6 +27,8 @@
extern "C" {
#endif
+#if !defined(__CUDA__)
jhuber6 wrote:
We'd want this to compile for the CUDA host, you should be able to check
`__CUDA_ARCH__` for the CUDA device only.
https://github.com/llvm/llvm-project/pull/128222
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Nick Sarnie (sarnex)
Changes
Apply a preemptive workaround for a possible behavior change in `__has_builtin`
as suggested in https://github.com/llvm/llvm-project/pull/121839 and
https://github.com/llvm/llvm-project/pull/126324.
---
Full
llvmbot wrote:
@llvm/pr-subscribers-backend-x86
Author: Nick Sarnie (sarnex)
Changes
Apply a preemptive workaround for a possible behavior change in `__has_builtin`
as suggested in https://github.com/llvm/llvm-project/pull/121839 and
https://github.com/llvm/llvm-project/pull/126324.
---
https://github.com/sarnex ready_for_review
https://github.com/llvm/llvm-project/pull/128222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sarnex edited
https://github.com/llvm/llvm-project/pull/128222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sarnex edited
https://github.com/llvm/llvm-project/pull/128222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sarnex created
https://github.com/llvm/llvm-project/pull/128222
None
>From b91e429ae1fc1cf8ea8239aba59789013961533c Mon Sep 17 00:00:00 2001
From: "Sarnie, Nick"
Date: Fri, 21 Feb 2025 11:50:48 -0800
Subject: [PATCH] [Clang][ARM] Only try to redefine builtins for non-CUDA
S
https://github.com/sarnex edited
https://github.com/llvm/llvm-project/pull/128222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
26 matches
Mail list logo