Skip to content

[dynamo] Add debug_dynamo_config_override support#176734

Closed
desertfire wants to merge 1 commit intogh/desertfire/665/basefrom
gh/desertfire/665/head
Closed

[dynamo] Add debug_dynamo_config_override support#176734
desertfire wants to merge 1 commit intogh/desertfire/665/basefrom
gh/desertfire/665/head

Conversation

@desertfire
Copy link
Copy Markdown
Contributor

@desertfire desertfire commented Mar 6, 2026

Stack from ghstack (oldest at bottom):

Add per-graph dynamo config overrides, mirroring the existing
debug_inductor_config_override. Set via TORCH_COMPILE_OVERRIDE_DYNAMO_CONFIGS
env var or config.debug_dynamo_config_override. The override is applied as a
config.patch context manager around the entire compile_frame call, so dynamo
config is patched for all tracing and backend compilation within that frame.

Warn when TORCH_COMPILE_OVERRIDE_DYNAMO_CONFIGS is set, since dynamo
config overrides are keyed by frame ID and some configs can affect graph
breaks, shifting frame IDs.

Authored with Claude.

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

Add per-graph dynamo config overrides, mirroring the existing
debug_inductor_config_override. Set via TORCH_COMPILE_OVERRIDE_DYNAMO_CONFIGS
env var or config.debug_dynamo_config_override. The override is applied as a
config.patch context manager around the entire compile_frame call, so dynamo
config is patched for all tracing and backend compilation within that frame.

Warn when TORCH_COMPILE_OVERRIDE_DYNAMO_CONFIGS is set, since dynamo
config overrides are keyed by frame ID and some configs can affect graph
breaks, shifting frame IDs.

Authored with Claude.

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

pytorch-bot bot commented Mar 6, 2026

🔗 Helpful Links

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

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

✅ You can merge normally! (7 Unrelated Failures)

As of commit 2929e63 with merge base 3258b18 (image):

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

BROKEN TRUNK - The following jobs 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.

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Mar 6, 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.

@desertfire desertfire marked this pull request as ready for review March 10, 2026 18:49
@desertfire desertfire requested a review from williamwen42 March 10, 2026 18:52
@pytorch-bot pytorch-bot bot added the ciflow/torchtitan Run TorchTitan integration tests label Mar 12, 2026
@desertfire
Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Mar 12, 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

sandy-gags pushed a commit to sandy-gags/pytorch that referenced this pull request Mar 12, 2026
Add per-graph dynamo config overrides, mirroring the existing
debug_inductor_config_override. Set via TORCH_COMPILE_OVERRIDE_DYNAMO_CONFIGS
env var or config.debug_dynamo_config_override. The override is applied as a
config.patch context manager around the entire compile_frame call, so dynamo
config is patched for all tracing and backend compilation within that frame.

Warn when TORCH_COMPILE_OVERRIDE_DYNAMO_CONFIGS is set, since dynamo
config overrides are keyed by frame ID and some configs can affect graph
breaks, shifting frame IDs.

Authored with Claude.

ghstack-source-id: f021929
Pull Request resolved: pytorch/pytorch#176734
pytorchmergebot pushed a commit that referenced this pull request Mar 14, 2026
Validate config keys at parse time for both
dynamo and inductor overrides, surfacing typos as clear ValueErrors
instead of deep InternalTorchDynamoError stack traces.

Authored with Claude.

Pull Request resolved: #176735
Approved by: https://github.com/williamwen42
ghstack dependencies: #176734
EmanueleCoradin pushed a commit to EmanueleCoradin/pytorch that referenced this pull request Mar 30, 2026
Add per-graph dynamo config overrides, mirroring the existing
debug_inductor_config_override. Set via TORCH_COMPILE_OVERRIDE_DYNAMO_CONFIGS
env var or config.debug_dynamo_config_override. The override is applied as a
config.patch context manager around the entire compile_frame call, so dynamo
config is patched for all tracing and backend compilation within that frame.

Warn when TORCH_COMPILE_OVERRIDE_DYNAMO_CONFIGS is set, since dynamo
config overrides are keyed by frame ID and some configs can affect graph
breaks, shifting frame IDs.

Authored with Claude.

Pull Request resolved: pytorch#176734
Approved by: https://github.com/williamwen42
EmanueleCoradin pushed a commit to EmanueleCoradin/pytorch that referenced this pull request Mar 30, 2026
Validate config keys at parse time for both
dynamo and inductor overrides, surfacing typos as clear ValueErrors
instead of deep InternalTorchDynamoError stack traces.

Authored with Claude.

Pull Request resolved: pytorch#176735
Approved by: https://github.com/williamwen42
ghstack dependencies: pytorch#176734
AaronWang04 pushed a commit to AaronWang04/pytorch that referenced this pull request Mar 31, 2026
Validate config keys at parse time for both
dynamo and inductor overrides, surfacing typos as clear ValueErrors
instead of deep InternalTorchDynamoError stack traces.

Authored with Claude.

Pull Request resolved: pytorch#176735
Approved by: https://github.com/williamwen42
ghstack dependencies: pytorch#176734
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/inductor ciflow/torchtitan Run TorchTitan integration tests ciflow/trunk Trigger trunk jobs on your pull request Merged module: dynamo release notes: dynamo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants