Skip to content

[dynamo] Record traced_sources on SubgraphTracer#176459

Closed
anijain2305 wants to merge 6 commits intogh/anijain2305/1055/basefrom
gh/anijain2305/1055/head
Closed

[dynamo] Record traced_sources on SubgraphTracer#176459
anijain2305 wants to merge 6 commits intogh/anijain2305/1055/basefrom
gh/anijain2305/1055/head

Conversation

@anijain2305
Copy link
Contributor

@anijain2305 anijain2305 commented Mar 4, 2026

Stack from ghstack (oldest at bottom):

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.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @chauhang @amjames @Lucaskabela @jataylo

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.

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 4, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/176459

Note: Links to docs will display an error until the docs builds have been completed.

❌ 3 Cancelled Jobs, 4 Unrelated Failures

As of commit 4a9cd82 with merge base 1da0362 (image):

CANCELLED JOBS - The following jobs were cancelled. Please retry:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

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.

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 4, 2026

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

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.

[ghstack-poisoned]
Copy link
Contributor

@Lucaskabela Lucaskabela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally good but minor nit on OrderedSet type

# effect was detected. None means no side effect was observed.
side_effect_stack: traceback.StackSummary | None = None
# All sources accessed via VariableBuilder during the subgraph trace.
traced_sources: OrderedSet[Any] = field(default_factory=OrderedSet)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: OrderedSet[Source]?

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.

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo

[ghstack-poisoned]
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.

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo

[ghstack-poisoned]
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.

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo

[ghstack-poisoned]
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.

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo

[ghstack-poisoned]
@pytorchmergebot
Copy link
Collaborator

Starting merge as part of PR stack under #176477

@anijain2305
Copy link
Contributor Author

@pytorchbot merge -i

sandy-gags pushed a commit to sandy-gags/pytorch that referenced this pull request Mar 12, 2026
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.

ghstack-source-id: af12cd2
Pull Request resolved: pytorch/pytorch#176459
sandy-gags pushed a commit to sandy-gags/pytorch that referenced this pull request Mar 13, 2026
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.

ghstack-source-id: 26bf4d7
Pull Request resolved: pytorch/pytorch#176459
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants