[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-19 Thread Vitor Sessak via cfe-commits
vitor1001 wrote: Create PR #144851 to re-apply it. https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-18 Thread Artem Belevich via cfe-commits
Artem-B wrote: It's a C++-11 feature. Tests still include c++98. We do not intend to keep everything working with c++98 (we already use c++11 in other headers), but we should not break it either. In this case, you can just enable the new stuff for c++11 or newer standards. https://github.com/

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-18 Thread via cfe-commits
vitor1001 wrote: > It appears to be breaking CUDA tests: > https://lab.llvm.org/buildbot/#/builders/69/builds/22559 Strange. Do you have any ideas why `decltype` is not working? https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mailin

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-18 Thread Artem Belevich via cfe-commits
Artem-B wrote: It appears to be breaking CUDA tests: https://lab.llvm.org/buildbot/#/builders/69/builds/22559 I'll revert it for now and we'll try again later. ``` [29/988] Building CXX object External/CUDA/CMakeFiles/math_h-cuda-11.8-c++98-libstdc++-10.dir/math_h.cu.o FAILED: External/CUDA/

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-17 Thread via cfe-commits
github-actions[bot] wrote: @vitor1001 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a buil

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-17 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B closed https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-16 Thread via cfe-commits
https://github.com/vitor1001 updated https://github.com/llvm/llvm-project/pull/143664 >From 539e69459aaf59785e9e835aec4fb0c45bbe6afc Mon Sep 17 00:00:00 2001 From: Vitor Sessak Date: Wed, 11 Jun 2025 08:21:48 + Subject: [PATCH] Add missing intrinsics to cuda headers. LLVM prevents the sm_3

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-16 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. @erichkeane, thanks for looking into it, no worries if nobody gets back. I think we should go ahead and land this in the mean time. https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mai

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-15 Thread via cfe-commits
vitor1001 wrote: > LGTM with one last nit. Thanks, all temporary variables (`tmp`, `ptr` and `value`) are now prefixed with __. https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-15 Thread via cfe-commits
https://github.com/vitor1001 updated https://github.com/llvm/llvm-project/pull/143664 >From dd356e979cc50d587ad73661bd7d7679776bc45b Mon Sep 17 00:00:00 2001 From: Vitor Sessak Date: Wed, 11 Jun 2025 08:21:48 + Subject: [PATCH] Add missing intrinsics to cuda headers. LLVM prevents the sm_3

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-13 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. LGTM with one last nit. https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-13 Thread Artem Belevich via cfe-commits
@@ -479,7 +479,291 @@ inline __device__ unsigned __funnelshift_rc(unsigned low32, unsigned high32, return ret; } -#endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 320 +#pragma push_macro("__INTRINSIC_LOAD") +#define __INTRINSIC_LOAD(__FnName, __AsmOp, __DeclType, __Tmp

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-13 Thread via cfe-commits
vitor1001 wrote: Thanks, good suggestions, all done. https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-13 Thread via cfe-commits
https://github.com/vitor1001 updated https://github.com/llvm/llvm-project/pull/143664 >From 079672a23dd5ef832f4fa9b974b3b23b2b48a207 Mon Sep 17 00:00:00 2001 From: Vitor Sessak Date: Wed, 11 Jun 2025 08:21:48 + Subject: [PATCH] Add missing intrinsics to cuda headers. LLVM prevents the sm_3

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-12 Thread Artem Belevich via cfe-commits
@@ -479,6 +479,275 @@ inline __device__ unsigned __funnelshift_rc(unsigned low32, unsigned high32, return ret; } +#define INTRINSIC_LOAD(func_name, asm_op, decl_type, internal_type, asm_type) \ Artem-B wrote: We have to be careful with the names used in th

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-12 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B requested changes to this pull request. Nice. I like this approach better. There are few more things to polish up, but it looks good overall. https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mailing list cfe-

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-12 Thread Artem Belevich via cfe-commits
@@ -479,6 +479,275 @@ inline __device__ unsigned __funnelshift_rc(unsigned low32, unsigned high32, return ret; } +#define INTRINSIC_LOAD(func_name, asm_op, decl_type, internal_type, asm_type) \ Artem-B wrote: Can we merge `INTRINSIC*` and `MINTRINSIC*` mac

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-12 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-12 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions h -- clang/lib/Headers/__clang_cuda_intrinsics.h ``

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-12 Thread via cfe-commits
https://github.com/vitor1001 updated https://github.com/llvm/llvm-project/pull/143664 >From f84189201a974dca4cdf29541bfa6877de0056e7 Mon Sep 17 00:00:00 2001 From: Vitor Sessak Date: Wed, 11 Jun 2025 08:21:48 + Subject: [PATCH] Add missing intrinsics to cuda headers. LLVM prevents the sm_3

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-12 Thread via cfe-commits
https://github.com/vitor1001 updated https://github.com/llvm/llvm-project/pull/143664 >From 78ac958d175568362dc6984486457585d0bb7d6d Mon Sep 17 00:00:00 2001 From: Vitor Sessak Date: Wed, 11 Jun 2025 08:21:48 + Subject: [PATCH] Add missing intrinsics to cuda headers. LLVM prevents the sm_3

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-11 Thread Erich Keane via cfe-commits
erichkeane wrote: > Erich, is there a good point-of-contact at nvidia who can review CUDA > intrinsic header changes in the future? For the most part, we don't have ANYTHING to do with CUDA in clang as far as I know. I also don't know much about CUDA, but I'll ping an internal slack channel

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-11 Thread Reid Kleckner via cfe-commits
rnk wrote: Erich, is there a good point-of-contact at nvidia who can review CUDA intrinsic header changes in the future? https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-11 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-11 Thread via cfe-commits
https://github.com/vitor1001 ready_for_review https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: None (vitor1001) Changes LLVM prevents the sm_32_intrinsics.hpp header from being included with a #define __SM_32_INTRINSICS_HPP__. It also provides drop-in replacements of the functions defined in the CUD

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-11 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-11 Thread via cfe-commits
https://github.com/vitor1001 created https://github.com/llvm/llvm-project/pull/143664 LLVM prevents the sm_32_intrinsics.hpp header from being included with a #define __SM_32_INTRINSICS_HPP__. It also provides drop-in replacements of the functions defined in the CUDA header. One issue is that