[dynamo] Track side effect stack on SubgraphTracer#176453
[dynamo] Track side effect stack on SubgraphTracer#176453anijain2305 wants to merge 7 commits intogh/anijain2305/1053/basefrom
Conversation
Replace the boolean has_side_effect flag on SubgraphTracer with side_effect_stack (StackSummary | None). None means no side effect; non-None carries the user code stack where the first externally-visible side effect was detected. Only externally-visible mutations (not is_side_effect_safe) are recorded, so local mutations inside the subgraph don't trigger it. Authored with Claude. [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/176453
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 4 Cancelled Jobs, 2 Unrelated FailuresAs of commit 241f60d with merge base 1da0362 ( NEW FAILURE - The following job has failed:
CANCELLED JOBS - The following jobs were cancelled. Please retry:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
Replace the boolean has_side_effect flag on SubgraphTracer with side_effect_stack (StackSummary | None). None means no side effect; non-None carries the user code stack where the first externally-visible side effect was detected. Only externally-visible mutations (not is_side_effect_safe) are recorded, so local mutations inside the subgraph don't trigger it. Authored with Claude. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo [ghstack-poisoned]
Replace the boolean has_side_effect flag on SubgraphTracer with side_effect_stack (StackSummary | None). None means no side effect; non-None carries the user code stack where the first externally-visible side effect was detected. Only externally-visible mutations (not is_side_effect_safe) are recorded, so local mutations inside the subgraph don't trigger it. Authored with Claude. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo [ghstack-poisoned]
Replace the boolean has_side_effect flag on SubgraphTracer with side_effect_stack (StackSummary | None). None means no side effect; non-None carries the user code stack where the first externally-visible side effect was detected. Only externally-visible mutations (not is_side_effect_safe) are recorded, so local mutations inside the subgraph don't trigger it. Authored with Claude. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo [ghstack-poisoned]
Replace the boolean has_side_effect flag on SubgraphTracer with side_effect_stack (StackSummary | None). None means no side effect; non-None carries the user code stack where the first externally-visible side effect was detected. Only externally-visible mutations (not is_side_effect_safe) are recorded, so local mutations inside the subgraph don't trigger it. Authored with Claude. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo [ghstack-poisoned]
Replace the boolean has_side_effect flag on SubgraphTracer with side_effect_stack (StackSummary | None). None means no side effect; non-None carries the user code stack where the first externally-visible side effect was detected. Only externally-visible mutations (not is_side_effect_safe) are recorded, so local mutations inside the subgraph don't trigger it. Authored with Claude. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo [ghstack-poisoned]
Replace the boolean has_side_effect flag on SubgraphTracer with side_effect_stack (StackSummary | None). None means no side effect; non-None carries the user code stack where the first externally-visible side effect was detected. Only externally-visible mutations (not is_side_effect_safe) are recorded, so local mutations inside the subgraph don't trigger it. Authored with Claude. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo [ghstack-poisoned]
|
Starting merge as part of PR stack under #176477 |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 7 checks: inductor / inductor-cpu-test / test (cpu_inductor_torchbench, 1, 2, linux.2xlarge.amx, unstable), inductor / unit-test / inductor-test / test (inductor, 2, 2, linux.g5.4xlarge.nvidia.gpu), inductor / unit-test / inductor-test / test (inductor, 1, 2, linux.g5.4xlarge.nvidia.gpu), inductor / unit-test / inductor-test / test (inductor_distributed, 1, 1, linux.g5.12xlarge.nvidia.gpu), inductor / unit-test / inductor-test / test (inductor_cpp_wrapper, 2, 2, linux.g5.4xlarge.nvidia.gpu), inductor / unit-test / inductor-test / test (inductor_cpp_wrapper, 1, 2, linux.g5.4xlarge.nvidia.gpu), inductor / inductor-test / test (inductor_huggingface, 1, 1, linux.g5.4xlarge.nvidia.gpu) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Record every source accessed via VariableBuilder (and cell loads via load_cell) into an OrderedSet on SubgraphTracer, then propagate it through SubgraphTracingInfo. This gives callers a complete picture of which sources were touched during a subgraph trace -- needed by the upcoming invoke_subgraph reuse mechanism to collect guards and detect mutations on captured variables. Authored with Claude. Pull Request resolved: #176459 Approved by: https://github.com/Lucaskabela, https://github.com/zou3519 ghstack dependencies: #176453
Replace the boolean has_side_effect flag on SubgraphTracer with side_effect_stack (StackSummary | None). None means no side effect; non-None carries the user code stack where the first externally-visible side effect was detected. Only externally-visible mutations (not is_side_effect_safe) are recorded, so local mutations inside the subgraph don't trigger it. Authored with Claude. ghstack-source-id: 8622656 Pull Request resolved: pytorch/pytorch#176453
Replace the boolean has_side_effect flag on SubgraphTracer with side_effect_stack (StackSummary | None). None means no side effect; non-None carries the user code stack where the first externally-visible side effect was detected. Only externally-visible mutations (not is_side_effect_safe) are recorded, so local mutations inside the subgraph don't trigger it. Authored with Claude. ghstack-source-id: 0d4f49f Pull Request resolved: pytorch/pytorch#176453
Replace the boolean has_side_effect flag on SubgraphTracer with side_effect_stack (StackSummary | None). None means no side effect; non-None carries the user code stack where the first externally-visible side effect was detected. Only externally-visible mutations (not is_side_effect_safe) are recorded, so local mutations inside the subgraph don't trigger it. Authored with Claude. ghstack-source-id: 3d21249 Pull Request resolved: pytorch/pytorch#176453
Stack from ghstack (oldest at bottom):
Replace the boolean has_side_effect flag on SubgraphTracer with
side_effect_stack (StackSummary | None). None means no side effect;
non-None carries the user code stack where the first externally-visible
side effect was detected.
Only externally-visible mutations (not is_side_effect_safe) are
recorded, so local mutations inside the subgraph don't trigger it.
Authored with Claude.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @chauhang @amjames @Lucaskabela @jataylo