[Mlir-commits] [mlir] [Linalg][Vectorization] Add support for linalg vectorization of a tensor.extract case (PR #107922)
Nirvedh Meshram
llvmlistbot at llvm.org
Thu Sep 19 14:45:53 PDT 2024
nirvedhmeshram wrote:
> @banach-space #100582 breaks the logic here as one of the test cases is
>
> ```
> %5 = linalg.generic {indexing_maps = [affine_map<(d0, d1) -> (d0, d1)>], iterator_types = ["parallel", "parallel"]} outs(%arg1 : tensor<?x?xf32>) {
> ^bb0(%out: f32):
> %6 = linalg.index 1 : index
> %7 = arith.addi %6, %arg2 : index
> %extracted = tensor.extract %arg0[%c79, %7] : tensor<?x?xf32>
> linalg.yield %extracted : f32
> } -> tensor<?x?xf32>
> ```
>
> where it will find two non unit dims and hit the assert
Iadapted the logic to check for dynamic dims and return the trailing dim if no non dynamic / non unit dim is found. That seems to work although seems ad-hoc.
https://github.com/llvm/llvm-project/pull/107922
More information about the Mlir-commits
mailing list