lightning-thunder
lightning-thunder copied to clipboard
provide trace checker and debug mode with it enabled
We are currently plagued a bit with inconsistency issues in traces and might have good use for a checker and then having a mode where we do this a lot:
- sometimes the shape metadata is not update properly (see #1179 )
- the return has inputs and outputs that should match (though we might possibly drop the outputs), but we have places that update only one (and other places that use the other), encountered in #1164,
- we currently do not guard against having two proxies with the same name. Proxy creation does compare to used names, but at various places, we copy proxies between traces (notably between prologue and compute/epilogue and forward/backward). This leads to all sorts of funny issues (encountered a lot in #1164 with forward/backward), but potentially also in other hard to debug issues, (given the brittleness we have with this, we might also make traces "own" proxies rather than them being "freely floating").
cc @carmocca @borda
The checker should also check that all proxies it finds are in the .names set.
Hi Tom! As discussed earlier through Slack, I would like to work on this one. Would be awesome if you can assign this to me. Thank you!