You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[PyTorch] Scope the quantized-param caching flag to its own graph capture
`make_graphed_callables(cache_quantized_params=True)` creates a process-global
flag tensor that gates quantized weight updates, and never scopes it. The
modules only check `fp8_graph_capturing()` before reading it, so any *later*
capture in the same process picks up the leftover tensor and bakes it in as its
own quantize noop flag. Nothing ever writes that flag for a callable graphed
without caching, so it keeps whatever the earlier capture left there: if that
was "skip", the second module silently reuses a stale quantized weight for the
rest of training while its master weight keeps being updated.
The flag tensor cannot be cleared or reallocated -- already-captured graphs bake
in its address and replay fills it in place -- so gate the read instead. Track
whether the capture in progress requested caching and hand out the tensor only
then, clearing the scope once capture finishes.
Affects every recipe, not a specific one. TE's own graph tests run each case in
a fresh process, which is why this never showed up in CI.
Signed-off-by: zhihaow6 <zhihaow6@illinois.edu>
0 commit comments