[Mlir-commits] [mlir] [mlir][ROCDL] Add tensor load and store instructions to ROCDL (PR #165016)
Justin Rosner
llvmlistbot at llvm.org
Mon Oct 27 11:25:13 PDT 2025
================
@@ -663,6 +663,82 @@ def ROCDL_GlobalLoadLDSOp :
}];
}
+//===---------------------------------------------------------------------===//
+// Tensor load/store intrinsics (available in GFX1250)
+//===---------------------------------------------------------------------===//
+
+def ROCDL_TensorLoadToLDSIntrOp :
+ ROCDL_IntrOp<"tensor.load.to.lds", [], [], [], 0, 0, 1, 0, [4], ["cachePolicy"]> {
+ dag args = (ins Arg<LLVM_VectorOf<I32>, "", [MemRead]>:$dgroup0,
----------------
justinrosner wrote:
Do we want to do something like the following instead then?
- Add the `MemoryEffectOpInterface` to each class
- Override the `getEffects` method:
```c++
void $cppClass::getEffects(
SmallVectorImpl<MemoryEffects::EffectInstance> &effects) {
auto inaccessible = mlir::LLVM::InaccessibleMemoryResource::get();
// These intrinsics read and write inaccessible memory (LDS).
effects.emplace_back(mlir::MemoryEffects::Read::get(), inaccessible, mlir::Value());
effects.emplace_back(mlir::MemoryEffects::Write::get(), inaccessible, mlir::Value());
}
```
Does this give a better matching with what the underlying LLVM intrinsic is doing?
https://github.com/llvm/llvm-project/pull/165016
More information about the Mlir-commits
mailing list