[Mlir-commits] [mlir] [mlir][Vector] Fix vector.extract lowering to llvm for 0-d vectors (PR #117731)
Andrzej Warzyński
llvmlistbot at llvm.org
Wed Dec 4 08:38:31 PST 2024
================
@@ -1290,26 +1290,65 @@ func.func @extract_scalar_from_vec_1d_f32_dynamic_idx_scalable(%arg0: vector<[16
// -----
-func.func @extract_scalar_from_vec_2d_f32_dynamic_idx(%arg0: vector<1x16xf32>, %arg1: index) -> f32 {
+func.func @extract_scalar_from_vec_2d_f32_inner_dynamic_idx(%arg0: vector<1x16xf32>, %arg1: index) -> f32 {
%0 = vector.extract %arg0[0, %arg1]: f32 from vector<1x16xf32>
return %0 : f32
}
-// Multi-dim vectors are not supported but this test shouldn't crash.
+// Multi-dim vectors are supported if the innermost index is dynamic.
----------------
banach-space wrote:
[nit] "supported" is a bit ambiguous here. "Lowering supports extracting from multi-dim vectors with dynamic indices provided that _only_ the trailing index is dynamic." (I just struggle a bit with "innermost" - "innermost" with respect to what? 😅 )
Feel free to re-use/modify/ignore.
https://github.com/llvm/llvm-project/pull/117731
More information about the Mlir-commits
mailing list