mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Stop parsing command line arguments every time common_utils is imported. (#156703)
Last PR in the series to re-submit https://github.com/pytorch/pytorch/pull/134592 as smaller PRs: https://github.com/pytorch/pytorch/pull/154612 https://github.com/pytorch/pytorch/pull/154628 https://github.com/pytorch/pytorch/pull/154715 https://github.com/pytorch/pytorch/pull/154716 https://github.com/pytorch/pytorch/pull/154725 https://github.com/pytorch/pytorch/pull/154728 Pull Request resolved: https://github.com/pytorch/pytorch/pull/156703 Approved by: https://github.com/clee2000
This commit is contained in:
committed by
PyTorch MergeBot
parent
e11b1cd97e
commit
310f901a71
@ -22,6 +22,13 @@ from torch.testing import FileCheck
|
||||
torch._C._jit_set_profiling_executor(True)
|
||||
torch._C._get_graph_executor_optimize(True)
|
||||
|
||||
if __name__ == "__main__":
|
||||
from torch.testing._internal.common_utils import parse_cmd_line_args
|
||||
|
||||
# The value of GRAPH_EXECUTOR depends on command line arguments so make sure they're parsed
|
||||
# before instantiating tests.
|
||||
parse_cmd_line_args()
|
||||
|
||||
from itertools import combinations, permutations, product
|
||||
from textwrap import dedent
|
||||
|
||||
|
Reference in New Issue
Block a user