Skip to content

Conversation

@pytorch-bot
Copy link

pytorch-bot bot commented Dec 10, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 8bbf3e0 with merge base 93bc987 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

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.

Few thoughts on the changes

torch._dynamo.graph_break()
return x + 4

@torch._dynamo.error_on_graph_break(True)
Copy link
Contributor

Choose a reason for hiding this comment

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

For completeness, can we have a test covering True in the outer and True in the inner? This should be covered but want to make sure our unit tests covers it

start_point: Optional[int]
is_leaf_tracer: bool
# Does this function make no inlined function calls?
is_leaf_function: bool
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Maybe we should just rename this to the more general is_leaf since this tracer may be for nn module (i.e the function part of the name is not so important)

Copy link
Member Author

@williamwen42 williamwen42 Dec 11, 2025

Choose a reason for hiding this comment

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

I want to avoid this because there's another concept of "leaf frame" for nested graph breaks that refers to the innermost frame; maybe we should avoid the term "leaf" for this attr completely


def inline_call_(self) -> VariableTracker:
parent = self.parent
parent.is_child_tracer_active = True
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we also need to set the parent's is_leaf to False?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's set somewhere else but this might be a better place to do it, yeah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants