[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-03-24 Thread Austin Schuh via cfe-commits
https://github.com/AustinSchuh created https://github.com/llvm/llvm-project/pull/132883 This adds support for all the surface read and write calls to clang. It extends the pattern used for textures to surfaces too. I tested this by generating all the various permutations of the calls and argu

[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-03-24 Thread Austin Schuh via cfe-commits
AustinSchuh wrote: @Artem-B I think you added texture support originally. A lot of the language in that file is focused on just textures, not textures and surfaces. I am happy to adjust that if that is desired. I figured a bit ugly, working, and early feedback was preferable. https://github

[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-03-29 Thread Austin Schuh via cfe-commits
AustinSchuh wrote: > If the header is compileable without CUDA SDK (maybe with some stub headers > in tests Inputs), then a source file with a lot of builtin calls and > [autogenerated > checks](https://github.com/llvm/llvm-project/blob/d724bab8064685c98cdded88157b6e2245e0d7bc/llvm/utils/updat

[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-04-03 Thread Austin Schuh via cfe-commits
@@ -0,0 +1,3329 @@ +// RUN: %clang_cc1 -triple nvptx-unknown-unknown -fcuda-is-device -O3 -o - %s -emit-llvm | FileCheck %s +// RUN: %clang_cc1 -triple nvptx64-unknown-unknown -fcuda-is-device -O3 -o - %s -emit-llvm | FileCheck %s +#include "../Headers/Inputs/include/cuda.h" ---

[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-03-24 Thread Austin Schuh via cfe-commits
https://github.com/AustinSchuh edited https://github.com/llvm/llvm-project/pull/132883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cuda clang: Clean up test dependency for CUDA surfaces (PR #134459)

2025-04-04 Thread Austin Schuh via cfe-commits
https://github.com/AustinSchuh created https://github.com/llvm/llvm-project/pull/134459 https://github.com/llvm/llvm-project/pull/132883 added support for cuda surfaces but reached into clang/test/Headers/ from clang/test/CodeGen/ to grab the minimal cuda.h. Duplicate that file instead based

[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-04-04 Thread Austin Schuh via cfe-commits
@@ -0,0 +1,3329 @@ +// RUN: %clang_cc1 -triple nvptx-unknown-unknown -fcuda-is-device -O3 -o - %s -emit-llvm | FileCheck %s +// RUN: %clang_cc1 -triple nvptx64-unknown-unknown -fcuda-is-device -O3 -o - %s -emit-llvm | FileCheck %s +#include "../Headers/Inputs/include/cuda.h" ---

[clang] cuda clang: Clean up test dependency for CUDA surfaces (PR #134459)

2025-04-04 Thread Austin Schuh via cfe-commits
AustinSchuh wrote: @slackito and @Artem-B , hopefully this addresses your feedback! https://github.com/llvm/llvm-project/pull/134459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-03-25 Thread Austin Schuh via cfe-commits
https://github.com/AustinSchuh updated https://github.com/llvm/llvm-project/pull/132883 >From d8ffb5acbd79869476c91433f85488f3088e38fd Mon Sep 17 00:00:00 2001 From: Austin Schuh Date: Mon, 24 Mar 2025 21:42:35 -0700 Subject: [PATCH 1/4] Add support for CUDA surfaces This adds support for all

[clang] [llvm] cuda clang: Fix argument order for __reduce_max_sync (PR #132881)

2025-03-25 Thread Austin Schuh via cfe-commits
https://github.com/AustinSchuh updated https://github.com/llvm/llvm-project/pull/132881 >From 381ba9f21b4c2a2c4028143b84e9f71c8a20692f Mon Sep 17 00:00:00 2001 From: Austin Schuh Date: Mon, 24 Mar 2025 21:42:45 -0700 Subject: [PATCH 1/2] cuda clang: Fix argument order for __reduce_max_sync The

[clang] [llvm] cuda clang: Fix argument order for __reduce_max_sync (PR #132881)

2025-03-25 Thread Austin Schuh via cfe-commits
@@ -315,7 +315,7 @@ defm MATCH_ALLP_SYNC_64 : MATCH_ALLP_SYNC { def : NVPTXInst<(outs Int32Regs:$dst), (ins Int32Regs:$src, Int32Regs:$mask), "redux.sync." # BinOp # "." # PTXType # " $dst, $src, $mask;", - [(set i32:$dst, (Intrin i32:$src, Int32Regs:$mask))

[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-03-25 Thread Austin Schuh via cfe-commits
https://github.com/AustinSchuh updated https://github.com/llvm/llvm-project/pull/132883 >From d8ffb5acbd79869476c91433f85488f3088e38fd Mon Sep 17 00:00:00 2001 From: Austin Schuh Date: Mon, 24 Mar 2025 21:42:35 -0700 Subject: [PATCH 1/2] Add support for CUDA surfaces This adds support for all

[clang] [llvm] cuda clang: Fix argument order for __reduce_max_sync (PR #132881)

2025-03-26 Thread Austin Schuh via cfe-commits
AustinSchuh wrote: > @AustinSchuh would you like me to merge the change for you, once the checks > are done? That would be wonderful. I don't know how to merge it (happy to learn, but I suspect I won't do it more than a couple of times) https://github.com/llvm/llvm-project/pull/132881 __

[clang] [llvm] cuda clang: Fix argument order for __reduce_max_sync (PR #132881)

2025-04-05 Thread Austin Schuh via cfe-commits
@@ -315,7 +315,7 @@ defm MATCH_ALLP_SYNC_64 : MATCH_ALLP_SYNC { def : NVPTXInst<(outs Int32Regs:$dst), (ins Int32Regs:$src, Int32Regs:$mask), "redux.sync." # BinOp # "." # PTXType # " $dst, $src, $mask;", - [(set i32:$dst, (Intrin i32:$src, Int32Regs:$mask))

[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-04-05 Thread Austin Schuh via cfe-commits
https://github.com/AustinSchuh edited https://github.com/llvm/llvm-project/pull/132883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-04-05 Thread Austin Schuh via cfe-commits
https://github.com/AustinSchuh edited https://github.com/llvm/llvm-project/pull/132883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits