[Mlir-commits] [mlir] [mlir][linalg] Support quantized NCHW/FCHW convolution in img2col (PR #225308)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Sep 21 23:46:34 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Dmitry Manjiev (Dima365)

<details>
<summary>Changes</summary>

Share the NCHW/FCHW img2col rewrite between regular and quantized convolutions. Preserve scalar zero-point operands and reuse the original convolution body in the generated linalg.generic.

Keep the original filter element type when collapsing its shape and register the quantized rewrite with the Transform dialect and rewrite patterns.

Add FileCheck coverage and an integration test comparing the original and transformed convolutions against expected results. Update existing NCHW/FCHW checks to account for the preserved input operand order.

---
Full diff: https://github.com/llvm/llvm-project/pull/225308.diff


6 Files Affected:

- (modified) mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td (+1-1) 
- (modified) mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h (+4) 
- (modified) mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp (+3) 
- (modified) mlir/lib/Dialect/Linalg/Transforms/ConvertConv2DToImg2Col.cpp (+55-16) 
- (modified) mlir/test/Dialect/Linalg/convert-conv2d-to-img2col.mlir (+70-4) 
- (added) mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nchw-fchw-q-img2col.mlir (+76) 


``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````

</details>


https://github.com/llvm/llvm-project/pull/225308


More information about the Mlir-commits mailing list