[Mlir-commits] [mlir] [MLIR][XeGPU][VectorToXeGPU] Lower vector.load/store/transfer_read/transfer_write to new offsets syntax (PR #162095)
Adam Siemieniuk
llvmlistbot at llvm.org
Wed Oct 22 01:20:26 PDT 2025
================
@@ -261,6 +261,21 @@ def XeGPU_PrefetchNdOp : XeGPU_Op<"prefetch_nd", []> {
: !xegpu.tensor_desc<8x16xf16>
```
+ The operation may take optional offsets for the tensor descriptor.
+ The number of offsets must be greater or equal to the rank of the tensor descriptor
+ and less than the rank of the source memref. The offsets are applied to the innermost
+ dimension of the source memref.
+
+ Examples:
+ ```mlir
+ %tdesc = xegpu.create_nd_tdesc %0: memref<2x8x32x32xf32> -> TensorDesc<8x16xf32>
+ // memref[0, 0, %off0, %off1]
+ xegpu.prefetch_nd %tdesc[%off0, %off1] : !xegpu.tensor_desc<8x16xf16>
+ // memref[0, %off0, %off1, %off2]
+ xegpu.prefetch_nd %tdesc[%off0, %off1, %off2] : !xegpu.tensor_desc<8x16xf16>
+ // memref[%off0, %off1, %off2, %off3]
+ xegpu.prefetch_nd %tdesc[%off0, %off1, %off2] : !xegpu.tensor_desc<8x16xf16>
----------------
adam-smnk wrote:
Mismatch in number of offsets between the comment and the example
https://github.com/llvm/llvm-project/pull/162095
More information about the Mlir-commits
mailing list