@@ -276,7 +276,9 @@ def XeGPU_PrefetchNdOp : XeGPU_Op<"prefetch_nd", []> {
276
276
}
277
277
278
278
279
- def XeGPU_LoadNdOp : XeGPU_Op<"load_nd", [AllElementTypesMatch<["value", "TensorDesc"]>]> {
279
+ def XeGPU_LoadNdOp : XeGPU_Op<"load_nd", [
280
+ AllElementTypesMatch<["value", "TensorDesc"]>, MemoryEffects<[MemRead]>
281
+ ]> {
280
282
let summary = "loads a n-D block from memory (represented by TensorDesc)"
281
283
"to registers (represented by vector)";
282
284
let description = [{
@@ -327,7 +329,9 @@ def XeGPU_LoadNdOp : XeGPU_Op<"load_nd", [AllElementTypesMatch<["value", "Tensor
327
329
let hasVerifier = 1;
328
330
}
329
331
330
- def XeGPU_StoreNdOp : XeGPU_Op<"store_nd", [AllElementTypesMatch<["value", "TensorDesc"]>]> {
332
+ def XeGPU_StoreNdOp : XeGPU_Op<"store_nd", [
333
+ AllElementTypesMatch<["value", "TensorDesc"]>, MemoryEffects<[MemWrite]>
334
+ ]> {
331
335
let summary = "stores a n-D block register region back to memory, currently only supports 2D";
332
336
333
337
let description = [{
@@ -548,7 +552,9 @@ def XeGPU_PrefetchOp : XeGPU_Op<"prefetch", []> {
548
552
let hasVerifier = 1;
549
553
}
550
554
551
- def XeGPU_LoadGatherOp : XeGPU_Op<"load", [AllElementTypesMatch<["value", "TensorDesc"]>]> {
555
+ def XeGPU_LoadGatherOp : XeGPU_Op<"load", [
556
+ AllElementTypesMatch<["value", "TensorDesc"]>, MemoryEffects<[MemRead]>
557
+ ]> {
552
558
let summary = "load a set of scattered data points from memory.";
553
559
554
560
let description = [{ It (aka. load) load data per each work-item. The output
@@ -618,7 +624,9 @@ def XeGPU_LoadGatherOp : XeGPU_Op<"load", [AllElementTypesMatch<["value", "Tenso
618
624
let hasVerifier = 1;
619
625
}
620
626
621
- def XeGPU_StoreScatterOp : XeGPU_Op<"store", [AllElementTypesMatch<["value", "TensorDesc"]>]> {
627
+ def XeGPU_StoreScatterOp : XeGPU_Op<"store", [
628
+ AllElementTypesMatch<["value", "TensorDesc"]>, MemoryEffects<[MemWrite]>
629
+ ]> {
622
630
let summary = "store data to scattered memory locations.";
623
631
let description = [{ It (aka. store) stores data to scattered memory locations. The value is
624
632
typically a 1D vector. But when the chunk size of the TensorDesc is larger than 1, it will be
0 commit comments