[Mlir-commits] [mlir] [mlir][vector] Canonicalize vector.extract and vector.broadcast to vector.shape_cast (PR #174452)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Jan 5 09:50:15 PST 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 7282 tests passed
* 598 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### MLIR
<details>
<summary>MLIR.Dialect/Linalg/transform-op-peel-and-vectorize-conv.mlir</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/transform-op-peel-and-vectorize-conv.mlir --transform-interpreter --split-input-file -resolve-shaped-type-result-dims -canonicalize | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/transform-op-peel-and-vectorize-conv.mlir
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/mlir-opt /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/transform-op-peel-and-vectorize-conv.mlir --transform-interpreter --split-input-file -resolve-shaped-type-result-dims -canonicalize
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/transform-op-peel-and-vectorize-conv.mlir
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/transform-op-peel-and-vectorize-conv.mlir:27:11: error: CHECK: expected string not found in input
# | // CHECK: vector.broadcast {{.*}} : vector<[4]xi32> to vector<1x4x[4]xi32>
# |           ^
# | <stdin>:24:108: note: scanning from here
# |  %7 = scf.for %arg8 = %c0 to %c43 step %c1 iter_args(%arg9 = %extracted_slice_1) -> (tensor<1x1x4x?xi32>) {
# |                                                                                                            ^
# | <stdin>:34:8: note: possible intended match here
# |  %11 = vector.broadcast %9 : vector<1x[4]xi32> to vector<1x4x[4]xi32>
# |        ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/test/Dialect/Linalg/transform-op-peel-and-vectorize-conv.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            19:  %4 = affine.apply #map()[%c4_vscale] 
# |            20:  %5 = scf.for %arg6 = %c0 to %4 step %c4_vscale iter_args(%arg7 = %arg5) -> (tensor<1x1080x1920x48xi32>) { 
# |            21:  %extracted_slice = tensor.extract_slice %arg0[0, %arg2, %arg4, %arg6] [1, 1, 46, %c4_vscale] [1, 1, 1, 1] : tensor<1x1080x1962x48xi32> to tensor<1x1x46x?xi32> 
# |            22:  %extracted_slice_0 = tensor.extract_slice %arg1[0, 0, %arg6] [1, 43, %c4_vscale] [1, 1, 1] : tensor<1x43x48xi32> to tensor<1x43x?xi32> 
# |            23:  %extracted_slice_1 = tensor.extract_slice %arg7[0, %arg2, %arg4, %arg6] [1, 1, 4, %c4_vscale] [1, 1, 1, 1] : tensor<1x1080x1920x48xi32> to tensor<1x1x4x?xi32> 
# |            24:  %7 = scf.for %arg8 = %c0 to %c43 step %c1 iter_args(%arg9 = %extracted_slice_1) -> (tensor<1x1x4x?xi32>) { 
# | check:27'0                                                                                                                X error: no match found
# |            25:  %extracted_slice_2 = tensor.extract_slice %extracted_slice[0, 0, %arg8, 0] [1, 1, 4, %c4_vscale] [1, 1, 1, 1] : tensor<1x1x46x?xi32> to tensor<1x1x4x?xi32> 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            26:  %extracted_slice_3 = tensor.extract_slice %extracted_slice_0[0, %arg8, 0] [1, 1, %c4_vscale] [1, 1, 1] : tensor<1x43x?xi32> to tensor<1x1x?xi32> 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            27:  %extracted_slice_4 = tensor.extract_slice %arg9[0, 0, 0, 0] [1, 1, 4, %c4_vscale] [1, 1, 1, 1] : tensor<1x1x4x?xi32> to tensor<1x1x4x?xi32> 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            28:  %extracted_slice_5 = tensor.extract_slice %extracted_slice_2[0, 0, 0, 0] [1, 1, 4, %c4_vscale] [1, 1, 1, 1] : tensor<1x1x4x?xi32> to tensor<1x4x?xi32> 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            29:  %extracted_slice_6 = tensor.extract_slice %extracted_slice_3[0, 0, 0] [1, 1, %c4_vscale] [1, 1, 1] : tensor<1x1x?xi32> to tensor<1x?xi32> 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            30:  %extracted_slice_7 = tensor.extract_slice %extracted_slice_4[0, 0, 0, 0] [1, 1, 4, %c4_vscale] [1, 1, 1, 1] : tensor<1x1x4x?xi32> to tensor<1x4x?xi32> 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            31:  %8 = vector.transfer_read %extracted_slice_5[%c0, %c0, %c0], %c0_i32 {in_bounds = [true, true, true]} : tensor<1x4x?xi32>, vector<1x4x[4]xi32> 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            32:  %9 = vector.transfer_read %extracted_slice_6[%c0, %c0], %c0_i32 {in_bounds = [true, true]} : tensor<1x?xi32>, vector<1x[4]xi32> 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            33:  %10 = vector.transfer_read %extracted_slice_7[%c0, %c0, %c0], %c0_i32 {in_bounds = [true, true, true]} : tensor<1x4x?xi32>, vector<1x4x[4]xi32> 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            34:  %11 = vector.broadcast %9 : vector<1x[4]xi32> to vector<1x4x[4]xi32> 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:27'1            ?                                                               possible intended match
# |            35:  %12 = arith.muli %8, %11 : vector<1x4x[4]xi32> 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            36:  %13 = arith.addi %12, %10 : vector<1x4x[4]xi32> 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            37:  %14 = vector.transfer_write %13, %extracted_slice_7[%c0, %c0, %c0] {in_bounds = [true, true, true]} : vector<1x4x[4]xi32>, tensor<1x4x?xi32> 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            38:  %inserted_slice_8 = tensor.insert_slice %14 into %extracted_slice_4[0, 0, 0, 0] [1, 1, 4, %c4_vscale] [1, 1, 1, 1] : tensor<1x4x?xi32> into tensor<1x1x4x?xi32> 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            39:  %inserted_slice_9 = tensor.insert_slice %inserted_slice_8 into %arg9[0, 0, 0, 0] [1, 1, 4, %c4_vscale] [1, 1, 1, 1] : tensor<1x1x4x?xi32> into tensor<1x1x4x?xi32> 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the Mlir-commits mailing list