[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:59:18 PDT 2025
================
@@ -715,15 +752,24 @@ def XeGPU_LoadGatherOp : XeGPU_Op<"load", [MemoryEffects<[MemRead]>]> {
: memref<1024xf32>, vector<16xi1>, vector<16xindex> -> vector<16xf32>
```
+ Example 4 (SIMT mode):
+ SIMT mode only accepts the offsets variant. chunk_size can be inferred from result
+ type. In this example, chunk_size is 8.
+ ```mlir
+ %2 = xegpu.load %1[%2], %0 <{l1_hint = #xegpu.cache_hint<cached>,
+ l2_hint = #xegpu.cache_hint<uncached>,
+ l3_hint = #xegpu.cache_hint<uncached>}>
+ : memref<128xf32>, vector<1xindex>, vector<1xi1> -> vector<8xf32>
+ ```
+
}];
- let arguments = (ins XeGPU_GatherScatterSourceType: $source,
- Optional<XeGPU_OffsetType>: $offsets,
- XeGPU_MaskType: $mask,
- OptionalAttr<I64Attr>: $chunk_size,
- 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,
+ AnyTypeOf<[XeGPU_MaskType, I1]>:$mask, OptionalAttr<I64Attr>:$chunk_size,
----------------
silee2 wrote:
I think keeping it separate is better for now. Same reason as stated above for offsets.
https://github.com/llvm/llvm-project/pull/154653
More information about the Mlir-commits
mailing list