aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/tutorial/MyFirstLanguageFrontend
diff options
context:
space:
mode:
authorgdehame <145553531+gdehame@users.noreply.github.com>2025-02-17 12:20:58 +0100
committerGitHub <noreply@github.com>2025-02-17 11:20:58 +0000
commita177be5528337575ee1b7079958d4250b2eb749f (patch)
treec1f2950f08b520559432d42883dfabb3f5cb233b /llvm/docs/tutorial/MyFirstLanguageFrontend
parent837b89fc0fc6d0ae7f68e835789ee62580314dcc (diff)
downloadllvm-a177be5528337575ee1b7079958d4250b2eb749f.zip
llvm-a177be5528337575ee1b7079958d4250b2eb749f.tar.gz
llvm-a177be5528337575ee1b7079958d4250b2eb749f.tar.bz2
[mlir][Linalg] Bugfix in decompose generic by unfolding permutation (#126737)
The pattern was returning success() by default which made the greedy pattern application act as if the IR was modified and even though nothing was changed and thus it can prevent it from converging for no legitimate reason. The patch makes the rewrite pattern return failure() by default and success() if and only if the IR changed. An example of unexpected behavior is by running `mlir-opt input.mlir --linalg-specialize-generic-ops`, we obtain an empty mlir as output with `input.mlir` as follows: ``` #map = affine_map<(d0) -> (d0)> func.func @f(%arg0: tensor<8xi32>, %arg1: tensor<8xi32>) -> tensor<8xi32> { %0 = tensor.empty() : tensor<8xi32> %1 = linalg.generic {indexing_maps = [#map, #map, #map], iterator_types = ["parallel"]} ins(%arg0, %arg1: tensor<8xi32>, tensor<8xi32>) outs(%0: tensor<8xi32>) { ^bb0(%in: i32, %in_0: i32, %out: i32): %2 = arith.addi %in, %in_0: i32 linalg.yield %2: i32 } -> tensor<8xi32> return %1 : tensor<8xi32> } ```
Diffstat (limited to 'llvm/docs/tutorial/MyFirstLanguageFrontend')
0 files changed, 0 insertions, 0 deletions