It's common in many dialects to use tensors to themselves hold tensor shapes (for example, the shape is itself the result of some non-trivial calculation). Currently, such dialects have to use tensor<?xi64> or worse (like allowing either i32 or i64 tensors to represent shapes). tensor<?xindex> is the natural type to represent this, but is currently disallowed. This patch allows it.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Are you aware of https://mlir.llvm.org/docs/Rationale/#index-type-disallowed-in-vectortensormemref-types ? (I'd expect this to be addressed in such patch)
Comment Actions
Since we accept tensors of dialect specific type, I am not sure why we should forbid the index type, so LGTM.
Comment Actions
Thanks for adding this. Looking forward to removing the index -> i64 -> index casting chains!