Rationale:
Only proper vectors and scalars of floating-point or integral types
are actually lowered to calls into the light-weight output library.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Vector/IR/VectorOps.cpp | ||
---|---|---|
5194–5206 ↗ | (On Diff #495213) | I hate to be that guy but that could be done at the tablegen level by making the input type a VectorOf<[...? |
mlir/lib/Dialect/Vector/IR/VectorOps.cpp | ||
---|---|---|
5194–5206 ↗ | (On Diff #495213) | Is there an easy way to say VectorOf or ScalarOf ? |
mlir/lib/Dialect/Vector/IR/VectorOps.cpp | ||
---|---|---|
5194–5206 ↗ | (On Diff #495213) | Looks like it doesn't exist and it would need to be added like it is on LLVM dialect: |
mlir/include/mlir/Dialect/Vector/IR/VectorOps.td | ||
---|---|---|
2443–2447 | This should be AnyVectorOf Or Scalar type of thing ? |
mlir/lib/Dialect/Vector/IR/VectorOps.cpp | ||
---|---|---|
5194–5206 ↗ | (On Diff #495213) | ah sorry for parroting .. +1 to adding to Tablegen .. here's a potential way Try Or<[AnyVector.predicate, AnySignlessIntegerOrIndex.predicate, AnyFloat.predicate]> ? We should have a proper: def AnyScalar : Or<AnySignlessIntegerOrIndex.predicate, AnyFloat.predicate, AnyComplex.predicate>; |
5194–5206 ↗ | (On Diff #495213) | Note that AnyVectorOfAnyRank is the proper thing to use until all ops support 0-D vectors.. |
Replaced C++ verification with declarative verification. Note that the C++ version was perhaps slightly more precise but we can refine the declarative part as we get better traits.
This at least moves my code away from the now obsoleted C++ way of checking stuff.
PTAL
This should be AnyVectorOf Or Scalar type of thing ?