[Mlir-commits] [mlir] [MLIR][XeGPU] make offsets optional for create_nd_tdesc (PR #148335)

Jianhui Li llvmlistbot at llvm.org
Thu Jul 17 09:16:20 PDT 2025


================
@@ -172,10 +202,16 @@ def XeGPU_CreateNdDescOp: XeGPU_Op<"create_nd_tdesc", [Pure, ViewLikeOpInterface
     /// and `const_shape` will be used to represent the shape of
     /// source operand. They overide static shape from source memref type.
     ArrayRef<int64_t> getStaticSizes() {
+      /// To be compatible with OffsetSizeAndStrideOpInterface, which expects valid return value and perform checks
+      static  llvm::SmallVector<int64_t, 4> emptyShape;
----------------
Jianhui-Li wrote:

The OffsetSizeAndStrideOpInterface always assume offset is available in the middle of parsing and assert failed if not. This allows the error message to be reported nicely. We could change OffsetSizeAndStrideOpInterface implementation, but it involves more discussion and may not worth it.  

https://github.com/llvm/llvm-project/pull/148335


More information about the Mlir-commits mailing list