Repository navigation
[compiled_autograd] Specialize the compiled-autograd backward on undefined tangent masks - #195884
bobrenjc93 wants to merge 1 commit into
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/195884
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 4 Cancelled Jobs, 18 PendingAs of commit d3c59ba with merge base 3d3d3f4 ( NEW FAILURES - The following jobs have failed:
CANCELLED JOBS - The following jobs were cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot label "release notes: dynamo" |
Stack from ghstack (oldest at bottom):
Compiled autograd traces the AOTAutograd backward through its own graph, so the
undefined-tangent specialization the previous commit adds to the live runtime
has to be mirrored there: the compiled-autograd backward observes the mask of
defined tangents at runtime, retraces the AOTAutograd backward for that mask
through graph_compile.retrace_backward_handling_errors under the same
per-TracingContext lock the runtime path uses (it re-runs the joint trace under
the shared fake mode), and falls back to structural pruning or the zero-tangent
base backward under the same policy. The grad-output prototype getattr node is
emitted only when pruning is on, so the flag-off compiled-autograd graph is
byte-for-byte unchanged (the goldens assert this).
Test Plan:
Authored with an AI assistant.
Co-Authored-By: Claude Fable 5.1 [email protected]
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo @azahed98 @xmfan @aditvenk