llvm / llvm/torch-mlir

Only simplify shape calculations inside shape calculation regions

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

Nobody has claimed this yet.

Dominant language
C++
Stars
1.9k
Forks
736
Avg merge
5d 22h
Merged PRs (30d)
15

Description

https://github.com/llvm/torch-mlir/blob/886ad169e5da32e3a35c2936846c791cc9d6e795/lib/Dialect/Torch/Transforms/SimplifyShapeCalculations.cpp#L32

We should only apply the transformations inside SimplifyShapeCalculations within the shape calculation regions. This can be accomplished by passing in a restricted set of ops to the applyPatternsAndFoldGreedily call [here](https://github.com/llvm/torch-mlir/blob/886ad169e5da32e3a35c2936846c791cc9d6e795/lib/Dialect/Torch/Transforms/SimplifyShapeCalculations.cpp#L410).

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

Read lib/Dialect/Torch/Transforms/SimplifyShapeCalculations.cpp around lines 32 and 410, starting at the applyPatternsAndFoldGreedily call. Trace how shape calculation regions are identified and how the pass selects operations. Done means the transformations are restricted to those regions and do not affect operations outside them.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.