[llvm] [mlir] [mlir][gpu] Change GPU modules to globals (PR #135478)

Christian Sigg via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 12 23:09:27 PDT 2025


================
@@ -0,0 +1,48 @@
+// Tests that we can run multiple kernels concurrently. Runs two kernels, which
+// increment a global atomic counter, then wait for the counter to reach 2.
+//
+// RUN: mlir-opt %s \
+// RUN: | mlir-opt -gpu-lower-to-nvvm-pipeline="cubin-format=%gpu_compilation_format" \
+// RUN: | mlir-runner \
+// RUN:   --shared-libs=%mlir_cuda_runtime \
+// RUN:   --shared-libs=%mlir_runner_utils \
+// RUN:   --entry-point-result=void
+
+module attributes {gpu.container_module} {
+    gpu.module @kernels {
+        gpu.func @kernel(%memref: memref<i32>) kernel {
----------------
chsigg wrote:

Done.

https://github.com/llvm/llvm-project/pull/135478


More information about the llvm-commits mailing list