-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[mlir][xegpu] SIMT distribution patterns for XeGPU CreateNdTdesc, LoadNd, StoreNd and Dpas Ops. #135271
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
TypeSwitch<Operation *>(op) | ||
.Case<xegpu::DpasOp>( | ||
[&](auto dpasOp) { visitDpasOp(dpasOp, operands, results); }) |
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.
Similar to the sharding propagation, you might consider using an OpInterface for this. It allows for a nicer code structure (the code is with the operation, not the lattice), for easier extension and for prettier dispatch code.
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.
I will take a look at your code. I think we can try to incorporate those ideas as well in future.
Hi Frank, thanks very much for the review. I tried to address everything as much as I can. please take a look.
Good question. For the operators handled in this PR, we expect perfect distribution. If the high-level work group level computation does not map to lane sizes evenly, it is the responsibility of work group to subgroup or subsequent optimizations to ensure perfect distribution at SIMT level. I think this will be done using masking gather/scatter type loads. Also we check this requirement during the lowering. If the vector shape is not distributable pass will report that and fail. |
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.
Overall structure LGTM % open comments
I lack experience in the distribution itself to give in-depth review of the core logic but nothing obvious catches my eye
@charithaintc I've landed b2e2ae8 to fix warnings from this PR. Thanks! |
Thanks! |
…dNd, StoreNd and Dpas Ops. (llvm#135271) This PR adds the SIMT distribution patterns for create_nd_tdesc, load_nd, store_nd and dpas XeGPU ops.
…dNd, StoreNd and Dpas Ops. (llvm#135271) This PR adds the SIMT distribution patterns for create_nd_tdesc, load_nd, store_nd and dpas XeGPU ops.
…dNd, StoreNd and Dpas Ops. (llvm#135271) This PR adds the SIMT distribution patterns for create_nd_tdesc, load_nd, store_nd and dpas XeGPU ops.
…dNd, StoreNd and Dpas Ops. (llvm#135271) This PR adds the SIMT distribution patterns for create_nd_tdesc, load_nd, store_nd and dpas XeGPU ops.
This PR adds the SIMT distribution patterns for create_nd_tdesc, load_nd, store_nd and dpas XeGPU ops.
Depends on: #135116