[Mlir-commits] [mlir] [mlir][linalg] Fix crash in FoldTensorCastUnPackOp with dynamic non-constant tile size (PR #189071)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Apr 9 03:02:26 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 3611 tests passed
* 416 tests skipped
* 1 test failed

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

### MLIR
<details>
<summary>MLIR.Dialect/Linalg/canonicalize.mlir</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe C:\_work\llvm-project\llvm-project\mlir\test\Dialect\Linalg\canonicalize.mlir -canonicalize="test-convergence" -split-input-file | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\mlir\test\Dialect\Linalg\canonicalize.mlir
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe' 'C:\_work\llvm-project\llvm-project\mlir\test\Dialect\Linalg\canonicalize.mlir' -canonicalize=test-convergence -split-input-file
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\mlir\test\Dialect\Linalg\canonicalize.mlir'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\mlir\test\Dialect\Linalg\canonicalize.mlir:1981:28: error: undefined variable: CAST
# | // CHECK: linalg.unpack %[[CAST]] inner_dims_pos = [0, 1] inner_tiles = [8, 1]
# |                            ^
# | <stdin>:1065:12: note: possible intended match here
# |  %unpack = linalg.unpack %arg0 inner_dims_pos = [0, 1] inner_tiles = [8, 1] into %arg1 : tensor<1x3x8x1xi32> -> tensor<7x3xi32>
# |            ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\mlir\test\Dialect\Linalg\canonicalize.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |               .
# |               .
# |               .
# |            1059:  } 
# |            1060: } 
# |            1061:  
# |            1062: // ----- 
# |            1063: module { 
# |            1064:  func.func @fold_cast_unpack_constant_tile_mismatch(%arg0: tensor<1x3x8x1xi32>, %arg1: tensor<7x3xi32>) -> tensor<7x3xi32> { 
# | check:1981'0                                                         X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: match failed for invalid pattern
# | check:1981'1                                                                                                                                   undefined variable: CAST
# |            1065:  %unpack = linalg.unpack %arg0 inner_dims_pos = [0, 1] inner_tiles = [8, 1] into %arg1 : tensor<1x3x8x1xi32> -> tensor<7x3xi32> 
# | check:1981'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:1981'2                ?                                                                                                                     possible intended match
# |            1066:  return %unpack : tensor<7x3xi32> 
# | check:1981'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            1067:  } 
# | check:1981'0     ~~~
# |            1068: } 
# | check:1981'0     ~~
# |            1069:  
# | check:1981'0     ~
# |            1070: // ----- 
# | check:1981'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/189071


More information about the Mlir-commits mailing list