Lightning-AI / Lightning-AI/lightning-thunder

Desired inplace idioms (add yours here)

Open
#657 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

design enhancement in-place
Dominant language
Python
Stars
1.5k
Forks
121
PR merge metrics
No merged PRs in 30d

Description

We do support some inplace thanks to @crcrpar 's great patches. This has enable running additional models already, but is limited to a few cases of particular interest.

However, we would want to see and prioritize other important inplace ideoms, so we would appreciate if you chimed in with needs you or your favourite model has.

Please do try to post
- a minimal code snippet,
- if you are aware of a particular model needing this, please also add this.

We don't want to support all corner cases of inplace (eg "does reshape produce a view or not") but we do care a lot about enabling users and models. Thank you!

P.S.: Also "don't need to support but should error" is a thing.

---

If you have traces as well as an idiom, then could you please paste `thunder.last_traces(jitted)[1:3]`, that are the traces generated by functionalization?

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

No source file or test is named. Start with a minimal code snippet demonstrating an important inplace idiom, identify any model that needs it, and include thunder.last_traces(jitted)[1:3] when traces are available. Done means documenting and prioritizing a concrete idiom or explicitly marking it unsupported with an error requirement.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
compilers, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.