[dynamo] Add debug_dynamo_config_override support#176734
[dynamo] Add debug_dynamo_config_override support#176734desertfire wants to merge 1 commit intogh/desertfire/665/basefrom
Conversation
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]
🔗 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 ( 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. |
This PR needs a
|
|
@pytorchbot merge |
Merge startedYour 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 |
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
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
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
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
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
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