<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/60212>60212</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[mlir][linalg vectoriser] Assertion `map.isProjectedPermutation( true)' failed.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
mlir:linalg,
mlir
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
banach-space
</td>
</tr>
</table>
<pre>
**input.mlir**
```mlir
module {
func.func @pipeline_dispatch_0_depthwise_conv_2d_nhwc_hwc_1x1082x1920x1x1x3(%extracted_slice_1: tensor<1x3x4x1xi32>, %extracted_slice_2: tensor<1x1x1xi32> ) -> tensor<1x3x4x1xi32>{
%arg7 = tensor.empty() : tensor<1x3x4x1xi32>
%19 = linalg.depthwise_conv_2d_nhwc_hwc {dilations = dense<1> : tensor<2xi64>, strides = dense<1> : tensor<2xi64>} ins(%extracted_slice_1, %extracted_slice_2 : tensor<1x3x4x1xi32>, tensor<1x1x1xi32>) outs(%arg7 : tensor<1x3x4x1xi32>) -> tensor<1x3x4x1xi32>
return %19 : tensor<1x3x4x1xi32>
}
transform.sequence failures(propagate) {
^bb0(%arg0: !pdl.operation):
%0 = transform.structured.match ops{["linalg.depthwise_conv_2d_nhwc_hwc"]} in %arg0
%1 = get_closest_isolated_parent %0 : (!pdl.operation) -> !pdl.operation
%2 = transform.structured.vectorize %1
}
}
```
**To reproduce**:
```bash
$ mlir-opt --test-transform-dialect-interpreter input.mlir
mlir-opt: /llvm-project/mlir/lib/IR/AffineMap.cpp:707: mlir::AffineMap mlir::inverseAndBroadcastProjectedPermutation(mlir::AffineMap): Assertion `map.isProjectedPermutation( true)' failed.
(...)
```
The assertion is being hit in [inverseAndBroadcastProjectedPermutation](https://github.com/llvm/llvm-project/blob/493bab8867bf17f54ccb9466a12622604287ad07/mlir/lib/IR/AffineMap.cpp#L707).
**Context**
Extracted from https://github.com/iree-org/iree/issues/11808.
CC @nicolasvasilache @dcaballe @ThomasRaoux (based on Git history)
-Andrzej
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVsuO4ygU_RqyQbEMfi-yyKMzGmlGarVqH2G4jmkR8ACudvXXj8BOKuquVNVopMThdV_nXI7DnJNnDbBBxQ4VhxUbfW_spmWa8X7tBsZh1RrxskF0i-hW6mH0yUVJO89RekDpFpXp_IkbcelixKgAo2o3z7tR8yQ8MMrTQQ6gpIaTkG5gnven9CRg8P0P6eDEjX4-UXHS_Q9-Cl8ykbSmE2loOpGJTBmiNaIFTN4y7kGcnJIcTgRlW-xBO2NRtidTNuUTmWRGUfYF0T1-w4T-YkJuBhjRBq_D4JHHa2U4OGb2XGGUHZbTCVwG_xLTbPB7ac0eEC1IE82V1Eydk8dgBESFVMxLo100EaAdBM8x6_tYdJJlvhTvvJUCPm1RHbDU7hHOD8B8t1K6fxvogJAZ_RJrwfEdNx-wslBiwY9W34D9gABUHRZDb5l2nbGXxME_I2gOuGNSjRZCgoM1AzszD5HWWwOg4kvbprcC0hAPUTIIlZgBbOQK0QZl22t6sWfSuWFeI3o7cj9aEMklXApsBheCFDtE6YeNgShFxWEmDl8TuQ9HYrgz-BNXxoHzJ-mMYoG_gVnQ_ppTSL5-I_8Z-N827mPQxyU9A_fGyp8Qc7ldnSvyr4OrlizTKDNPBlsYrBEjh0V4sl-1p2Wuv9rkOCjR2gwe4_Xag_PrW1JrIZkC7tdSe7CDBQ8W3-naLF-L-YzGUanny3qw5jtwj-hx1r-jki2ixz-_IXrcdp3U8DcbEj4MKNtWaRVM48EsJHs7cLcm9TNYB1stdtYwwZnzX-cYIL6CvYx-gb5-w8_cUHjrHNhwCgf5ZUMi3QMf2NsxNC6iVexpEMkVrjpJkrDzFgFPPWB2CyIdbkHqM-6lj41W7D5bRXFAtO69H1yohB4RPZ6l78c24eayYPw71K0yAeS8yVrW1nVZtR2puiLnvG3ysmSElpSWaU7riom0-gQ5NPsrsEObBC8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