[Mlir-commits] [mlir] [mlir][xegpu] Add definition of SliceAttr (PR #150146)
Jianhui Li
llvmlistbot at llvm.org
Thu Aug 7 15:10:18 PDT 2025
================
@@ -33,6 +37,55 @@ void XeGPUDialect::initialize() {
>();
}
+/// Generates instructions to compute offsets for a subgroup identified by
+/// its multidimensional indices (sgId), using the specified subgroup layout
+/// (sgLayout), subgroup data dimensions (sgShape), and the overall data
+/// dimensions (shape).
+static SmallVector<SmallVector<Value>>
+genOffsetsComputations(OpBuilder &builder, Location loc,
+ SmallVector<Value> sgId, ArrayRef<int64_t> sgLayout,
+ ArrayRef<int64_t> sgShape, ArrayRef<int64_t> shape) {
----------------
Jianhui-Li wrote:
consider generalizing sgShape to sgDataStride.
>From the caller size, need to set as following :
sgDataStride[i] == sgShape[i] if (wgData[i] % (sgData[i]*sgLayout[i])) == 0
sgDataStride[i] == 0 if wgData[i] == sgData[i]
https://github.com/llvm/llvm-project/pull/150146
More information about the Mlir-commits
mailing list