lightning-thunder
lightning-thunder copied to clipboard
Transform writer's guide
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_bsymand when to use what,- bsym.from_bsym_swap_proxies
- adding inputs and outputs,
- higher level
- interpret_trace,
- visitor_transform,
- lower level / editing traces directly
(feel free to add)
cc @borda @apaz-cli @riccardofelluga
use of scopes (see also https://github.com/Lightning-AI/lightning-thunder/issues/935 )