Skip to content

Commit daf1839

Browse files
committed
Allow scalar offset for SIMT mode gather / scatter / prefetch ops.
1 parent af57f45 commit daf1839

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def XeGPU_PrefetchOp : XeGPU_Op<"prefetch", []> {
609609
Example 2:
610610
A variant accepts memref as base pointer and an offset instead of scattered TensorTdesc.
611611
It combines "create scattered TensorTdesc" and "prefetch with scattered TensorTdesc".
612-
The source operand could be a raw pointer (uint64_t).
612+
The source operand could be a raw pointer (ui64, ui32, i64, i32).
613613
Please refer to create_tdesc for the restriction of memref.
614614
```mlir
615615
%a = memref.alloc() : memref<1024xf32>
@@ -632,7 +632,7 @@ def XeGPU_PrefetchOp : XeGPU_Op<"prefetch", []> {
632632
}];
633633

634634
let arguments = (ins XeGPU_GatherScatterSourceType: $source,
635-
Optional<XeGPU_OffsetType>: $offsets,
635+
Optional<AnyTypeOf<[XeGPU_OffsetType, Index]>>: $offsets,
636636
OptionalAttr<XeGPU_CacheHintAttr>: $l1_hint,
637637
OptionalAttr<XeGPU_CacheHintAttr>: $l2_hint,
638638
OptionalAttr<XeGPU_CacheHintAttr>: $l3_hint);
@@ -742,7 +742,7 @@ def XeGPU_LoadGatherOp : XeGPU_Op<"load", [MemoryEffects<[MemRead]>]> {
742742
}];
743743

744744
let arguments = (ins XeGPU_GatherScatterSourceType: $source,
745-
Optional<XeGPU_OffsetType>: $offsets,
745+
Optional<AnyTypeOf<[XeGPU_OffsetType, Index]>>: $offsets,
746746
XeGPU_MaskType: $mask,
747747
OptionalAttr<I64Attr>: $chunk_size,
748748
OptionalAttr<XeGPU_CacheHintAttr>: $l1_hint,
@@ -870,7 +870,7 @@ def XeGPU_StoreScatterOp : XeGPU_Op<"store", [MemoryEffects<[MemWrite]>]> {
870870
let arguments = (ins
871871
XeGPU_ValueType: $value,
872872
XeGPU_GatherScatterSourceType: $dest,
873-
Optional<XeGPU_OffsetType>: $offsets,
873+
Optional<AnyTypeOf<[XeGPU_OffsetType, Index]>>: $offsets,
874874
XeGPU_MaskType: $mask,
875875
OptionalAttr<I64Attr>: $chunk_size,
876876
OptionalAttr<XeGPU_CacheHintAttr>: $l1_hint,

0 commit comments

Comments
 (0)