[Mlir-commits] [mlir] [MLIR][XeGPU] Update XeGPU create_tdesc, update_offset, load, store and prefetch. (PR #154653)
Chao Chen
llvmlistbot at llvm.org
Fri Aug 22 08:31:46 PDT 2025
================
@@ -617,13 +636,22 @@ def XeGPU_PrefetchOp : XeGPU_Op<"prefetch", []> {
: memref<1024xf32>, vector<4xindex>
```
+ Example 3 (SIMT mode):
+ SIMT mode only accepts the offsets variant.
+ ```mlir
+ xegpu.prefetch %0[%1] {l1_hint = #xegpu.cache_hint<cached>,
+ l2_hint = #xegpu.cache_hint<cached>,
+ l3_hint = #xegpu.cache_hint<cached>}
+ : memref<256xf32>, vector<1xindex>
+ ```
+
}];
- let arguments = (ins XeGPU_GatherScatterSourceType: $source,
- Optional<XeGPU_OffsetType>: $offsets,
- OptionalAttr<XeGPU_CacheHintAttr>: $l1_hint,
- OptionalAttr<XeGPU_CacheHintAttr>: $l2_hint,
- OptionalAttr<XeGPU_CacheHintAttr>: $l3_hint);
+ let arguments = (ins XeGPU_GatherScatterSourceType:$source,
+ Optional<AnyTypeOf<[XeGPU_OffsetType, Index]>>:$offsets,
+ OptionalAttr<XeGPU_CacheHintAttr>:$l1_hint,
+ OptionalAttr<XeGPU_CacheHintAttr>:$l2_hint,
+ OptionalAttr<XeGPU_CacheHintAttr>:$l3_hint);
let extraClassDeclaration = extraBaseClassDeclaration # [{
Type getSourceType() {
----------------
chencha3 wrote:
Could you help to get rid of getTensorDesc() and getTensorDescType() methods if XeGPU_GatherScatterSourceType doesn't support TensorDesc.
https://github.com/llvm/llvm-project/pull/154653
More information about the Mlir-commits
mailing list