[Mlir-commits] [mlir] [mlir][tosa] Lower AVG_POOL2D_ADAPTIVE to Linalg (PR #225637)
Jack Frankland
llvmlistbot at llvm.org
Tue Sep 29 08:00:27 PDT 2026
================
@@ -1141,5 +1141,8 @@ void mlir::tosa::populateTosaToLinalgNamedConversionPatterns(
patterns->add<
MaxPool2dConverter
>(converter, patterns->getContext());
+
+ tosa::AvgPool2dAdaptiveOp::getCanonicalizationPatterns(
----------------
FranklandJack wrote:
Yeah this is a really good point. For our pipeline we have no intention of supporting the adaptive/v2 behavior in the immediate future, this would (I think) be part of the EXT-DYNAMIC extension support.
I guess the only advantage to calling this here (as well as within a canonicalization pass) is that it would allow pipelines that haven't run the TOSA canonicalization to lower AvgPool2dAdaptiveOp provided they only supported the new arguments as CTC - I admit this isn't the strongest argument though. Am happy to close this (and the analogous max_pool_2d change) in favor of pipelines handling this through canonicalization until support for the dynamic arguments is implemented at some point down the road.
https://github.com/llvm/llvm-project/pull/225637
More information about the Mlir-commits
mailing list