[flang-commits] [flang] [flang][cuda] Adapt ExternalNameConversion to work in gpu module (PR #117039)

Renaud Kauffmann via flang-commits flang-commits at lists.llvm.org
Wed Nov 20 14:02:48 PST 2024


================
@@ -0,0 +1,13 @@
+// RUN: fir-opt --split-input-file --external-name-interop %s | FileCheck %s
+
+gpu.module @cuda_device_mod {
+  gpu.func @_QPfoo() {
+    fir.call @_QPthreadfence() fastmath<contract> : () -> ()
+    gpu.return
+  }
+  func.func private @_QPthreadfence() attributes {cuf.proc_attr = #cuf.cuda_proc<device>}
+}
+
+// CHECK-LABEL: gpu.func @_QPfoo
+// CHECK: fir.call @threadfence_()
+// CHECK: func.func private @threadfence_()
----------------
Renaud-K wrote:

Couldn't we use the nvvm dialect here ?

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


More information about the flang-commits mailing list