brintos

brintos / llvm-project-archived public Read only

0
0
Text · 604 B · cedfcac Raw
16 lines · plain
1// RUN: mlir-opt -convert-xegpu-to-xevm %s | FileCheck %s2 3gpu.module @fence_check {4    gpu.func @fence(%dst: memref<8x16xf32, 1>) kernel {5        %tid_x = gpu.thread_id x6        %tid_x_i32 = arith.index_cast %tid_x : index to i327        %tid_x_f32 = arith.sitofp %tid_x_i32 : i32 to f328 9        // CHECK: xevm.memfence <{addrspace = #xevm.addr_space<global>, scope = #xevm.mem_scope<workgroup>}>10        xegpu.fence memory_kind = global, fence_scope = workgroup11        %c0 = arith.constant 0 : index12        memref.store %tid_x_f32, %dst[%c0, %c0] : memref<8x16xf32, 1>13        gpu.return14    }15}16