lightning-thunder icon indicating copy to clipboard operation
lightning-thunder copied to clipboard

Transform writer's guide

Open t-vi opened this issue 1 year ago • 1 comments

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

t-vi avatar Sep 26 '24 07:09 t-vi

use of scopes (see also https://github.com/Lightning-AI/lightning-thunder/issues/935 )

t-vi avatar Sep 30 '24 13:09 t-vi