When converting/lowering to LLVM, MLIR does not support n-D scalable
vectors at the moment. This patch simply clarifies an assert that's
meant to catch such unsupported cases.
Note that we may want to relax this condition in the future.
Differential D154302
[mlir][nfc] Clarify the limitation on scalable vectors awarzynski on Jul 2 2023, 8:59 AM. Authored by
Details When converting/lowering to LLVM, MLIR does not support n-D scalable Note that we may want to relax this condition in the future.
Diff Detail
Event TimelineComment Actions I've done a bit of digging and summarized my findings here: https://github.com/openxla/iree/issues/14294. Tl;Dr It's a bit tricky and convoluted :) Basically, we need to find a way to prevent LLVM type converter to treat scalable 2-d vectors _when_ targeting ArmSME. For SME such types are legal, though obfuscated. Importantly, LLVM does not support such types and we need to make sure that the "SME lowering" takes care of everything. I am about to send an update so that you can see what solution I came up with.
Comment Actions @c-rhodes , thanks for the review! I am realising that rather than extending LLVMConverter, we could just create a custom type converter for SME that inherits from LLVMConverter and effectively disables conversions for VectorType: https://reviews.llvm.org/D155365. This way LLVMConverter remains intact, which IMHO is a cleaner way to approach this. I will updating this shortly. Comment Actions Move the TypeConversion "fix" to https://reviews.llvm.org/D155365, address Cullen's comments Comment Actions Why is there no SVESME.md on mlir-www with the current status and supported features? Comment Actions What do you mean by mlir-www? https://mlir.llvm.org/? I don't see any dedicated space there to track WIP projects. A lot of MLIR folks use Discourse to communicate updates and that's what we try to do on semi-regular basis, see:
IMHO, this patch is too small to deserve a dedicated post.
|
I think it's worth highlighting here why this is, i.e. LLVM doesn't support arrays for scalable vectors.