[Mlir-commits] [mlir] [MLIR][NVVM] Update prefetch.tensormap Op (PR #153134)

Srinivasa Ravi llvmlistbot at llvm.org
Thu Aug 14 05:31:00 PDT 2025


================
@@ -2464,15 +2466,30 @@ def NVVM_PrefetchOp : NVVM_Op<"prefetch"> {
   }];
 }
 
-def NVVM_PrefetchTensorMapOp : NVVM_Op<"prefetch.tensormap",
-                    [DeclareOpInterfaceMethods<BasicPtxBuilderOpInterface>]>,
-  Arguments<(ins LLVM_AnyPointer:$tmaDescriptor, PtxPredicate:$predicate)> {
-  let assemblyFormat = "$tmaDescriptor (`,` `predicate` `=` $predicate^)? attr-dict `:` type(operands)";
+def NVVM_PrefetchTensorMapOp : NVVM_Op<"prefetch.tensormap", 
+    [DeclareOpInterfaceMethods<BasicPtxBuilderOpInterface>, NVVMRequiresSM<90>]> {
----------------
Wolfram70 wrote:

The main pain points with fusing them are that the assembly format of `prefetch` requires `level =` so we would need to define `tensormap` as a `PrefetchCacheLevel` which I don't know if it is fully correct and the input pointer spaces are different (global/local vs const/param). I will try to find a clean way to combine them (if possible, without changing the assembly format of `prefetch`), thanks!

Yes, @durga4github and I had a discussion regarding extending extending the checks to the operand/attribute level as well a while ago. I plan to look into this as well.

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


More information about the Mlir-commits mailing list