[Mlir-commits] [mlir] [mlir][vector] Add more tests for ConvertVectorToLLVM (2/n) (PR #102203)

Hugo Trachino llvmlistbot at llvm.org
Wed Aug 7 02:26:19 PDT 2024


https://github.com/nujaa commented:

LGTM. Please ping when the dependent MRs are merged for approval.
A bit off topic but, This MR got me wondering about the handling of cases where the lhs would be scalable and found out it was considered invalid. e.g. 
```
 // expected-error @+1 {{expected either both or only #2 operand dim to be scalable}}
vector.outerproduct %0, %1 : vector<[4]xf32>, vector<4xf32>
// equivalent to
// for i = 0 to vscale
// | %0i = extract %0[i*4] vector<[4]xf32>-> vector<4xf32>
// | vector.outerproduct %0i, %1 : vector<4xf32>, vector<4xf32>
```
Does it make sense to support this usecase in the future or do we consider this should never be generated and the user never write it ? I have seen another MR recently (from you I think) which did not handle the lowering to a loop. 
```
      // This restriction reflects what's currently supported in terms of
      // scalable vectors. However, we could relax this if there's a use case.
```
In case I get into sorting this out, do you think we should have some separate scalable vectors canonicalization patterns a bit like ArmSMEToSCF but without the SME dependency or simply have lowerVectorToLLVM support this case is enough ?


https://github.com/llvm/llvm-project/pull/102203


More information about the Mlir-commits mailing list