Lightning-AI / Lightning-AI/lightning-thunder

Dyanmic Shape TensorProxy

Open
#1,039 2 comments 0 reactions 1 assignee View on GitHub

@jjsjann123 is already working on this.

Since Aug 23, 2024.

dynamic constraints enhancement thunderfx
Dominant language
Python
Stars
1.5k
Forks
121
PR merge metrics
No merged PRs in 30d

Description

## 🚀 Feature

This is a continuation of the work in #262 . The phase 2 [proposal](https://docs.google.com/document/d/1jRizLZawjJptN_Qq7vHnqwK9vhlYc_woAwauGQQcqA8/edit#heading=h.yx2ge23f1e7) targets the re-use of compiled thunder program by supporting TensorProxy with dynamic shape and adjusting caching policy accordingly.

This is an umbrella issue to track progress. I would like to leave detailed technical discussion in separate issues and link them. This section will be gradually populated as we start picking up speed:

- shape propagation modeling in thunder
- [x] Enabling NumberProxy in TensorProxy.shape (toy PR #1027)
- [x] Adding shape prim (PR #1113)
- [x] Issue that blocks the #1182 . Should be resolved in #1201
- [ ] shape logic in prim needs to be modeled in trace Issue: #471
- [x] modeling shape queries: #1253 . Will need two PR to resolve, PR 1 #1260

- Static constraints and prologue checks
- [ ] #1133 We are ready to push towards this issue now. Since current shape queries ended up with duplicated shape access. We would want to clean it up.

- Handling of existing shape checks
- [ ] broadcast semantic handling in dynamic shape is broken in symbolic values cache. existing contraints doesn't work on NumberProxy in TensorProxy.shape. Issue opened #1525

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.