Repository navigation
Add new tile size for fp16 and fallback if vectorization is not possible - #3882
Conversation
not aligned on tile size.
| auto rhsType = op.inputs()[1].getType().cast<MemRefType>(); | ||
| assert(lhsType.getElementType() == rhsType.getElementType()); | ||
| // Pick ideal tile size based on the type. | ||
| SmallVector<int64_t, 4> ts; |
There was a problem hiding this comment.
Can we name it better to be clear? Something like workgroupLevel? (So we can name threadTs as invocationLevel.)
| } | ||
|
|
||
| if (options.enableVectorization) { | ||
| if (launchConfig.useVectorize()) { |
There was a problem hiding this comment.
It would be nice to kill the cl option entirely and make vectorization on by default. Any remaining work for that?
There was a problem hiding this comment.
Good point, I think it should all work at this point and we can enable it by default. I'll send another PR for that.
|
Adding an additional argument here seems to be a lot of work that needs to be repeated if we need new arguments. Can the Then we don't need to do this if we need new options. Note that this will also help in the process of eventually killing |
MaheshRavishankar
left a comment
There was a problem hiding this comment.
Requesting a change based on comment
Sounds good, I made a structure will all the dispatch level config info. |
MaheshRavishankar
left a comment
There was a problem hiding this comment.
Thanks! Not blocking comment, but passing by reference can be problematic (I know I implemented it, but I shouldnt have done it that way in hind sight). Its easy to drop the & if you are passing to another function by reference and then you dont get what you want and its hard to trace down. I am attempting to move to use Optional<...> instead of LogicalResult ... (... &val)
Would you also pull |
For ARM, pick tile size based on the type for MatmulOp.
Make launchConfig decide if we should apply vectorization passes to allow fallback for small or none-aligned operations.