[Mlir-commits] [mlir] [MLIR][NVGPU] Add `tma.fence.descriptor` OP (PR #133218)
Durgadoss R
llvmlistbot at llvm.org
Thu Mar 27 04:49:53 PDT 2025
================
@@ -802,6 +802,17 @@ func.func @tma_prefetch(%tensorMap1d: !tensorMap1d, %p : i1) {
func.return
}
+
+// CHECK-LABEL: @tma_fence(
+// CHECK-SAME: %[[arg0:[a-zA-Z0-9_]+]]: !nvgpu.tensormap.descriptor<tensor = memref<128xf32, 3>, swizzle = none, l2promo = none, oob = nan, interleave = none>
+func.func @tma_fence(%tensorMap1d: !tensorMap1d) {
+ // CHECK: %[[S0:.+]] = builtin.unrealized_conversion_cast %[[arg0]] : !nvgpu.tensormap.descriptor<tensor = memref<128xf32, 3>, swizzle = none, l2promo = none, oob = nan, interleave = none> to !llvm.ptr
+ // CHECK: %[[S1:.+]] = llvm.mlir.constant(128 : i32) : i32
+ // CHECK: nvvm.fence.proxy.acquire <sys> %[[S0]], %[[S1]]
----------------
durga4github wrote:
Glad to see that we already have this Op in NVVM Dialect and it is lowering to the intrinsics!
https://github.com/llvm/llvm-project/pull/133218
More information about the Mlir-commits
mailing list