_interpret_call
could reuse names in a trace when it's called in the lookaside of torch.autograd.Function
#1776
Labels
🐛 Bug
As per title,
lightning-thunder/thunder/core/interpreter.py
Lines 6459 to 6470 in 7c16a1a
lightning-thunder/thunder/core/jit_ext.py
Lines 686 to 725 in 7c16a1a
I use lightning-thunder @ 7c16a1a
To Reproduce
Code sample
Error
NOTE: If
t
is created bytorch.randn((4, 4), dtype=torch.bfloat16)
, then this error does not happen. Thus it seems to be related to thatltorch.to
returning the input as is with certain conditions met.Trace of
g
Expected behavior
It shouldn't reuse proxy names.
Initial Attempts to debug
1. check proxy names
With the following diff, I got a bit friendlier message:
The message I get with the diff above:
Assign a variable to return of
tensor.to(...)
I tried the following
Func.forward
only to see the same error.Environment
conda
,pip
, source): sourceMAX_JOBS=16 BUILD_TEST=0 USE_FLASH_ATTENTION=0 USE_MKLDNN=0 USE_SYSTEM_NCCL=1 NCCL_ROOT=/usr/local python setup.py develop --cmake
Additional context
The text was updated successfully, but these errors were encountered: