Standardize Tensor Shape Types to `index`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 14
- Forks
- 2
- Avg merge
- 12h 42m
- Merged PRs (30d)
- 61
Description
During MLIR generation, we currently use i32 for dimensions and then emit arith.index_cast to convert them to index types for memref.alloc. It would be more efficient and idiomatic to standard MLIR to evaluate and propagate shapes natively as index types earlier in the lowering pipeline, which would remove the need for intermediate casts.
Action: Audit the AST and frontend lowering to natively support an index type for dimensions instead of i32/i64.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the AST and frontend-lowering paths used during MLIR generation, looking for tensor dimensions represented as i32 or i64 and converted with arith.index_cast. Done means dimensions are evaluated and propagated as index types for memref.alloc, with the intermediate casts removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100