Skip to content

Fix CPython 3.13 test failures reported in dynamo-unittest job#172448

Closed
guilhermeleobas wants to merge 9 commits intogh/guilhermeleobas/276/basefrom
gh/guilhermeleobas/276/head
Closed

Fix CPython 3.13 test failures reported in dynamo-unittest job#172448
guilhermeleobas wants to merge 9 commits intogh/guilhermeleobas/276/basefrom
gh/guilhermeleobas/276/head

Conversation

@guilhermeleobas
Copy link
Copy Markdown
Collaborator

@guilhermeleobas guilhermeleobas commented Jan 14, 2026

[ghstack-poisoned]
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Jan 14, 2026

🔗 Helpful Links

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

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

❌ 9 Cancelled Jobs

As of commit 934c564 with merge base 6cf834b (image):

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

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

guilhermeleobas added a commit that referenced this pull request Jan 14, 2026
@guilhermeleobas guilhermeleobas added the ciflow/dynamo Trigger jobs ran periodically on main for dynamo tests label Jan 14, 2026
[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request Jan 14, 2026
[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request Jan 14, 2026
@guilhermeleobas guilhermeleobas marked this pull request as ready for review January 14, 2026 17:36
[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request Jan 14, 2026
Comment thread torch/_dynamo/variables/functions.py Outdated
finally:
_converting.discard(self_id)

def is_python_constant(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: add -> bool: to function def and should be good

Copy link
Copy Markdown
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.

Minor typing nit (pyrefly signal is blocking). Should be a straightforward fix - thanks for fixing these tests!

[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request Jan 14, 2026
[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request Jan 14, 2026
Comment on lines +1631 to +1637
def is_python_constant(self) -> bool:
try:
self.as_python_constant()
return True
except Exception:
return False

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@tugsbayasgalan could you see if this change makes sense to you? _get_function() is called from as_python_constant() and if tx.output.side_effects.load_cell(cell_var) raises unsupported, Dynamo bail and skips all remaining frames. This is problematic for the CPython test suite as some tests will suddenly pass.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Quick reminder that this changes the default impl. of is_python_constant to capture any Exception and not just NotImplementedError.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we just need to catch ClosureConversionError as well?

Copy link
Copy Markdown
Collaborator Author

@guilhermeleobas guilhermeleobas Jan 19, 2026

Choose a reason for hiding this comment

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

Yes! No, Unsupported.

[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request Jan 19, 2026
@guilhermeleobas
Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jan 19, 2026
@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@guilhermeleobas
Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@guilhermeleobas
Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge -i

guilhermeleobas added a commit that referenced this pull request Feb 5, 2026
The dynamo-unnitest (Python 3.13) job is constantly failing due to some
CPython tests starts passing or failing. In the past, I've send PRs
(#174091, #172448) to make the job green again but it is a matter of days
for it to start failing again.

This PR adds a CI job that only runs the CPython tests on Python 3.13 to
ensure we catch these errors earlier on.

ghstack-source-id: 8d53b96
Pull-Request: #174414
guilhermeleobas added a commit that referenced this pull request Feb 5, 2026
The dynamo-unnitest (Python 3.13) job is constantly failing due to some
CPython tests starts passing or failing. In the past, I've send PRs
(#174091, #172448) to make the job green again but it is a matter of days
for it to start failing again.

This PR adds a dedicated Ci job that runs only the CPython tests on
Python 3.13, allowing us to catch these issues earlier.

ghstack-source-id: 8d53b96
Pull-Request: #174414
guilhermeleobas added a commit that referenced this pull request Feb 5, 2026
The dynamo-unnitest (Python 3.13) job is constantly failing due to some
CPython tests starts passing or failing. In the past, I've send PRs
(#174091, #172448) to make the job green again but it is a matter of days
for it to start failing again.

This PR adds a dedicated Ci job that runs only the CPython tests on
Python 3.13, allowing us to catch these issues earlier.

ghstack-source-id: 9e4183b
Pull-Request: #174414
guilhermeleobas added a commit that referenced this pull request Feb 5, 2026
The dynamo-unnitest (Python 3.13) job is constantly failing due to some
CPython tests starts passing or failing. In the past, I've send PRs
(#174091, #172448) to make the job green again but it is a matter of days
for it to start failing again.

This PR adds a dedicated Ci job that runs only the CPython tests on
Python 3.13, allowing us to catch these issues earlier.

Contrary to this one, the dynamo-unittest job runs weekly on a broader
set of tests. This one is supposed to run on pull requests that touches
dynamo.

ghstack-source-id: 4b1e42d
Pull-Request: #174414
guilhermeleobas added a commit that referenced this pull request Feb 5, 2026
The dynamo-unnitest (Python 3.13) job is constantly failing due to some
CPython tests starts passing or failing. In the past, I've send PRs
(#174091, #172448) to make the job green again but it is a matter of days
for it to start failing again.

This PR adds a dedicated Ci job that runs only the CPython tests on
Python 3.13, allowing us to catch these issues earlier.

Contrary to this one, the dynamo-unittest job runs weekly on a broader
set of tests. This one is supposed to run on pull requests that touches
dynamo.

ghstack-source-id: 6ecd6a3
Pull-Request: #174414
guilhermeleobas added a commit that referenced this pull request Feb 6, 2026
The dynamo-unnitest (Python 3.13) job is constantly failing due to some
CPython tests starts passing or failing. In the past, I've send PRs
(#174091, #172448) to make the job green again but it is a matter of days
for it to start failing again.

This PR adds a dedicated Ci job that runs only the CPython tests on
Python 3.13, allowing us to catch these issues earlier.

Contrary to this one, the dynamo-unittest job runs weekly on a broader
set of tests. This one is supposed to run on pull requests that touches
dynamo.

ghstack-source-id: 3db6709
Pull-Request: #174414
pytorchmergebot pushed a commit that referenced this pull request Feb 9, 2026
The dynamo-unnitest (Python 3.13) job is constantly failing due to some
CPython tests starts passing or failing. In the past, I've send PRs
(#174091, #172448) to make the job green again but it is a matter of days
for it to start failing again.

This PR adds a dedicated Ci job that runs only the CPython tests on
Python 3.13, allowing us to catch these issues earlier.

Contrary to this one, the dynamo-unittest job runs weekly on a broader
set of tests. This one is supposed to run on pull requests that touches
dynamo.

ghstack-source-id: 1c3b41d
Pull-Request: #174414
pytorchmergebot pushed a commit that referenced this pull request Feb 10, 2026
The dynamo-unnitest (Python 3.13) job is constantly failing due to some
CPython tests starts passing or failing. In the past, I've send PRs
(#174091, #172448) to make the job green again but it is a matter of days
for it to start failing again.

This PR adds a dedicated Ci job that runs only the CPython tests on
Python 3.13, allowing us to catch these issues earlier.

Contrary to this one, the dynamo-unittest job runs weekly on a broader
set of tests. This one is supposed to run on pull requests that touches
dynamo.

ghstack-source-id: 6915a1e
Pull-Request: #174414
pytorchmergebot pushed a commit that referenced this pull request Feb 13, 2026
The dynamo-unnitest (Python 3.13) job is constantly failing due to some
CPython tests starts passing or failing. In the past, I've send PRs
(#174091, #172448) to make the job green again but it is a matter of days
for it to start failing again.

This PR adds a dedicated Ci job that runs only the CPython tests on
Python 3.13, allowing us to catch these issues earlier.

Contrary to this one, the dynamo-unittest job runs weekly on a broader
set of tests. This one is supposed to run on pull requests that touches
dynamo.

Pull Request resolved: #174414
Approved by: https://github.com/huydhn
pytorchmergebot pushed a commit that referenced this pull request Feb 13, 2026
The dynamo-unnitest (Python 3.13) job is constantly failing due to some
CPython tests starts passing or failing. In the past, I've send PRs
(#174091, #172448) to make the job green again but it is a matter of days
for it to start failing again.

This PR adds a dedicated Ci job that runs only the CPython tests on
Python 3.13, allowing us to catch these issues earlier.

Contrary to this one, the dynamo-unittest job runs weekly on a broader
set of tests. This one is supposed to run on pull requests that touches
dynamo.

ghstack-source-id: 67f43f6
Pull-Request: #174414
guilhermeleobas added a commit that referenced this pull request Feb 13, 2026
The dynamo-unnitest (Python 3.13) job is constantly failing due to some
CPython tests starts passing or failing. In the past, I've send PRs
(#174091, #172448) to make the job green again but it is a matter of days
for it to start failing again.

This PR adds a dedicated Ci job that runs only the CPython tests on
Python 3.13, allowing us to catch these issues earlier.

Contrary to this one, the dynamo-unittest job runs weekly on a broader
set of tests. This one is supposed to run on pull requests that touches
dynamo.

ghstack-source-id: ec908f9
Pull-Request: #174414
pytorchmergebot pushed a commit that referenced this pull request Feb 13, 2026
The dynamo-unnitest (Python 3.13) job is constantly failing due to some
CPython tests starts passing or failing. In the past, I've send PRs
(#174091, #172448) to make the job green again but it is a matter of days
for it to start failing again.

This PR adds a dedicated Ci job that runs only the CPython tests on
Python 3.13, allowing us to catch these issues earlier.

Contrary to this one, the dynamo-unittest job runs weekly on a broader
set of tests. This one is supposed to run on pull requests that touches
dynamo.

Pull Request resolved: #174414
Approved by: https://github.com/huydhn
@github-actions github-actions Bot deleted the gh/guilhermeleobas/276/head branch February 20, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/dynamo Trigger jobs ran periodically on main for dynamo tests ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request Merged module: dynamo open source topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants