Lowerings tosa.max_pool2d to linalg equivalent operations. Includes
adding max pooling operations for linalg, with corresponding tests.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp | ||
---|---|---|
1435 | If pad[0] and pad[1] etc. are integers, you could just create an IntegerAttr. So OpFoldResult ... = rewriter.createI64IntegerAttr(pad[1]) Also, I dont think createOrFold does anything for ConstantIndexOp . Could just use create (i have made the same mistake previously, so stating comments from then) |
mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp | ||
---|---|---|
1444 | I am not sure I follow this (sorry if my previous comment was not clear). The RHS values are all constants right? So you could just create an IntegerAttr for these statically known values. Basically there is no need for the ConstantIndexOp used to create any of these values AFAICS. (Sorry I had commented earlier, but forgot to hit enter) |
Looks fine to me except for use of C++-14 feature which might cause build issues. So LGTM apart from that issue. Please make sure no bots are broken
mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp | ||
---|---|---|
1459 | This is a C++-14 feature. I am not sure what compilers/level of c++14 support the buildbots use. I try to stick to C++11? |
mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp | ||
---|---|---|
1459 | LLVM is C++14. |
If pad[0] and pad[1] etc. are integers, you could just create an IntegerAttr. So
Also, I dont think createOrFold does anything for ConstantIndexOp . Could just use create (i have made the same mistake previously, so stating comments from then)