brintos

brintos / llvm-project-archived public Read only

0
0
Text · 775 B · cd028a2 Raw
26 lines · plain
1// RUN: fir-opt --split-input-file --external-name-interop %s | FileCheck %s2 3module @mod attributes {gpu.container_module} {4 5gpu.module @cuda_device_mod {6  gpu.func @_QPfoo() kernel {7    fir.call @_QPthreadfence() fastmath<contract> : () -> ()8    gpu.return9  }10  func.func private @_QPthreadfence() attributes {cuf.proc_attr = #cuf.cuda_proc<device>}11}12 13func.func @test() -> () {14  %0 = llvm.mlir.constant(0 : i64) : i6415  %1 = llvm.mlir.constant(0 : i32) : i3216  gpu.launch_func  @cuda_device_mod::@_QPfoo blocks in (%0, %0, %0) threads in (%0, %0, %0) : i64 dynamic_shared_memory_size %117  return18}19 20// CHECK-LABEL: gpu.func @foo_()21// CHECK: fir.call @threadfence_()22// CHECK: func.func private @threadfence_()23// CHECK: gpu.launch_func  @cuda_device_mod::@foo_ 24 25}26