[Mlir-commits] [mlir] [mlir][linalg] Fix crash in tile_reduction when output map has constant exprs (PR #189166)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sat Mar 28 06:03:34 PDT 2026


github-actions[bot] wrote:

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

* 3588 tests passed
* 415 tests skipped
* 1 test failed

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

### MLIR
<details>
<summary>MLIR.Dialect/Linalg/transform-tile-reduction.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\transform-tile-reduction.mlir -transform-interpreter -split-input-file -canonicalize -cse -verify-diagnostics | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\mlir\test\Dialect\Linalg\transform-tile-reduction.mlir
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe' 'C:\_work\llvm-project\llvm-project\mlir\test\Dialect\Linalg\transform-tile-reduction.mlir' -transform-interpreter -split-input-file -canonicalize -cse -verify-diagnostics
# 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\transform-tile-reduction.mlir'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\mlir\test\Dialect\Linalg\transform-tile-reduction.mlir:770:17: error: CHECK-LABEL: expected string not found in input
# | // CHECK-LABEL: func @reduction_tile_with_constant_in_output_map
# |                 ^
# | <stdin>:609:55: note: scanning from here
# |  func.func @reduction_tile_with_constant_in_output_map(%arg0: tensor<1x4096x64xf32>, %arg1: tensor<1x1x64xf32>) -> tensor<1x1x64xf32> {
# |                                                       ^
# | <stdin>:633:14: note: possible intended match here
# |  module attributes {transform.with_named_sequence} {
# |              ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\mlir\test\Dialect\Linalg\transform-tile-reduction.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |            604: // ----- 
# |            605: #map = affine_map<()[s0] -> (s0 floordiv 4)> 
# |            606: #map1 = affine_map<(d0, d1, d2) -> (d0, d1, d2)> 
# |            607: #map2 = affine_map<(d0, d1, d2) -> (d0, 0, d2)> 
# |            608: module { 
# |            609:  func.func @reduction_tile_with_constant_in_output_map(%arg0: tensor<1x4096x64xf32>, %arg1: tensor<1x1x64xf32>) -> tensor<1x1x64xf32> { 
# | label:770'0                                                           X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |            610:  %cst = arith.constant 0.000000e+00 : f32 
# | label:770'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            611:  %0 = tensor.empty() : tensor<1x1x64x1024xf32> 
# | label:770'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            612:  %1 = linalg.fill ins(%cst : f32) outs(%0 : tensor<1x1x64x1024xf32>) -> tensor<1x1x64x1024xf32> 
# | label:770'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            613:  %2 = scf.forall (%arg2) = (0) to (4096) step (4) shared_outs(%arg3 = %1) -> (tensor<1x1x64x1024xf32>) { 
# | label:770'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            614:  %3 = affine.apply #map()[%arg2] 
# | label:770'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |            628:  %3 = arith.addf %in, %init : f32 
# | label:770'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            629:  linalg.yield %3 : f32 
# | label:770'0     ~~~~~~~~~~~~~~~~~~~~~~~
# |            630:  } 
# | label:770'0     ~~~
# |            631:  return %reduced : tensor<1x1x64xf32> 
# | label:770'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            632:  } 
# | label:770'0     ~~~
# |            633:  module attributes {transform.with_named_sequence} { 
# | label:770'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | label:770'1                  ?                                        possible intended match
# |            634:  transform.named_sequence @__transform_main(%arg0: !transform.any_op {transform.readonly}) { 
# | label:770'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            635:  %0 = transform.structured.match ops{["linalg.generic"]} in %arg0 : (!transform.any_op) -> !transform.any_op 
# | label:770'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            636:  %fill_op, %split_op, %combining_op, %forall_op = transform.structured.tile_reduction_using_forall %0 by tile_sizes = [0, 4, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op) 
# | label:770'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            637:  transform.yield  
# | label:770'0     ~~~~~~~~~~~~~~~~~~
# |            638:  } 
# | label:770'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/189166


More information about the Mlir-commits mailing list