[Mlir-commits] [mlir] [mlir] Add first-class support for scalability in VectorType dims (PR #74251)
Benjamin Maxwell
llvmlistbot at llvm.org
Thu Dec 7 07:56:45 PST 2023
MacDue wrote:
As a little summary this is what I'd like to solve:
- Safety
- You have to specify a type of quantity in dim comparisons (fixed or scalable)
- Can't forget to check the scalability of a dim (no implicit conversions, & can't forget to look at the `scalableDims` array)
- Can't easily drop your `scalableDims` (they're safely stored in your `VectorDims`)
- Convenience & readability
- It should not be harder for people writing scalable-aware code to do things correctly
- Standard handy iterators and utilities work with `VectorDims`
- Simple helpers inspecting/updating your vector dims
- It should be easy to read some code and see if it's doing the correct checks
- Currently, when you do something like `getDimSize(0) == 1 && !getScalableDims()[0]`, it obscures that's checking for `VectorDim::getFixed(1)`
I don't think this is a complete solution, but I think it's a fairly non-invasive step towards something nicer :)
https://github.com/llvm/llvm-project/pull/74251
More information about the Mlir-commits
mailing list