vx-lang / vx-lang/Vx

Standardize Tensor Shape Types to `index`

Open
#92 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

codegen refactor
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.