Lightning-AI / Lightning-AI/lightning-thunder

Transform writer's guide

Open
#1,202 1 comment 1 reaction 0 assignees View on GitHub
documentation
Dominant language
Python
Stars
1.5k
Forks
121
PR merge metrics
No merged PRs in 30d

Description

Having written a few "new-style" transforms between a few people, we might compile a guide:

- intervention points for transforms in the thunder.jit flow,
- expected trace properties and how they might break and how to preserve them (and checking them in debug mode #1180 ),
- tooling
- lower level / editing traces directly
- handling proxies (new, replace, ...)
- finding things (produces and consumers)
- scopes
- `sym.bind(...)` vs. `sym(...)` vs. `bsym.from_bsym` and when to use what,
- bsym.from_bsym_swap_proxies
- adding inputs and outputs,
- higher level
- interpret_trace,
- visitor_transform,

(feel free to add)

cc @borda @apaz-cli @riccardofelluga

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the thunder.jit flow and the transform tooling named in the issue, including interpret_trace and visitor_transform. The guide should cover intervention points, trace properties and debug checking, proxy and scope handling, symbol APIs, adding inputs and outputs, and related lower- and higher-level workflows.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.