-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[mlir][xegpu] Patch dynamic descriptor creation #93580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-mlir Author: Artem Kroviakov (akroviakov) ChangesThis brief PR fixes the bug in XeGPU's Full diff: https://github.com/llvm/llvm-project/pull/93580.diff 1 Files Affected:
diff --git a/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp b/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
index 22959224d56c2..37904f55cc23a 100644
--- a/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+++ b/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
@@ -110,7 +110,7 @@ void CreateNdDescOp::build(OpBuilder &builder, OperationState &state,
dispatchIndexOpFoldResults(offsets, dynamicOffsets, staticOffsets);
dispatchIndexOpFoldResults(shape, dynamicShape, staticShape);
- dispatchIndexOpFoldResults(strides, dynamicStrides, staticOffsets);
+ dispatchIndexOpFoldResults(strides, dynamicStrides, dynamicOffsets);
auto staticOffsetsAttr = builder.getDenseI64ArrayAttr(staticOffsets);
auto staticShapeAttr = builder.getDenseI64ArrayAttr(staticShape);
|
@llvm/pr-subscribers-mlir-gpu Author: Artem Kroviakov (akroviakov) ChangesThis brief PR fixes the bug in XeGPU's Full diff: https://github.com/llvm/llvm-project/pull/93580.diff 1 Files Affected:
diff --git a/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp b/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
index 22959224d56c2..37904f55cc23a 100644
--- a/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
+++ b/mlir/lib/Dialect/XeGPU/IR/XeGPUOps.cpp
@@ -110,7 +110,7 @@ void CreateNdDescOp::build(OpBuilder &builder, OperationState &state,
dispatchIndexOpFoldResults(offsets, dynamicOffsets, staticOffsets);
dispatchIndexOpFoldResults(shape, dynamicShape, staticShape);
- dispatchIndexOpFoldResults(strides, dynamicStrides, staticOffsets);
+ dispatchIndexOpFoldResults(strides, dynamicStrides, dynamicOffsets);
auto staticOffsetsAttr = builder.getDenseI64ArrayAttr(staticOffsets);
auto staticShapeAttr = builder.getDenseI64ArrayAttr(staticShape);
|
cc @chencha3 |
61d0c77
to
bd8c26a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the fix!
I guess XeGPU op verifier is too simple.
@chencha3 we should probably look into that in a separate PR
Yes, you are right. Currently some parameters of XeGPU ops are architecture specific, and we left them checked by an arch class in downstream. We need to rethink this part. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This brief PR fixes the bug in XeGPU's
CreateNdDescOp
tensor creation with dynamic offset and strides.