mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[AoTI Minifier] UX Improvement (#143330)
Summary: - When a user specify `TORCHINDUCTOR_MAX_AUTOTUNE=1` env variable, we add `config.max_autotune=True` to the generated minifier_launcher - We should do this to other inductor configs as well in a followup Diff Currently in dynamo and aoti minifier, if a config is overwritten by an env variable, the config will not show up in the config list in the minifier_launcher.py file. As a result, when running the minifier_launcher, they need to re-apply the same env variable. This is: 1) not convenient for the users 2) if they copy-paste the minifier_launcher.py to us without including the env variable, we could be confused and not able to reproduce the error. Underlying implementation change: - Add `env_default` parameter to `codegen_config()`. If set, configs overriden by the env are not considered default. Test Plan: ``` buck2 run 'fbcode//mode/dev-nosan' fbcode//caffe2/test:utils -- -r test_codegen_config ``` Differential Revision: D67299312 Pull Request resolved: https://github.com/pytorch/pytorch/pull/143330 Approved by: https://github.com/jansel, https://github.com/eellison
This commit is contained in:
committed by
PyTorch MergeBot
parent
096cb874d3
commit
72e8f34715
@ -173,6 +173,9 @@ class TestConfigModule(TestCase):
|
||||
self.assertEqual(
|
||||
code,
|
||||
"""torch.testing._internal.fake_config_module.e_bool = False
|
||||
torch.testing._internal.fake_config_module.e_env_default = True
|
||||
torch.testing._internal.fake_config_module.e_env_default_FALSE = False
|
||||
torch.testing._internal.fake_config_module.e_env_force = True
|
||||
torch.testing._internal.fake_config_module._save_config_ignore = ['e_ignored']""",
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user