[Mlir-commits] [mlir] [MLIR][XeGPU] Update XeGPU create_tdesc, update_offset, load, store and prefetch. (PR #154653)
Sang Ik Lee
llvmlistbot at llvm.org
Thu Aug 21 17:47:39 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,
----------------
silee2 wrote:
Scalar offset is provided for simplifying layout distribution to SIMT.
But single element vector of offset is also valid.
Scalar is an exception.
I think keeping XeGPU_OffsetType as vector type and explicitly spelling out scalar Index type fits that idea better.
https://github.com/llvm/llvm-project/pull/154653
More information about the Mlir-commits
mailing list