Update run_test.py to use TEST_WITH_SLOW_GRADCHECK flag (#104819)

Finishes the job from #104537. See https://github.com/pytorch/pytorch/pull/104537#pullrequestreview-1520065008
Pull Request resolved: https://github.com/pytorch/pytorch/pull/104819
Approved by: https://github.com/huydhn
This commit is contained in:
Joel Schlosser
2023-07-10 14:20:08 -04:00
committed by PyTorch MergeBot
parent 24aa8b9b9a
commit ece19bf018
2 changed files with 2 additions and 6 deletions

View File

@ -24,13 +24,13 @@ from torch.testing._internal.common_utils import (
FILE_SCHEMA,
get_report_path,
IS_CI,
is_slow_gradcheck_env,
parser as common_parser,
retry_shell,
set_cwd,
shell,
TEST_WITH_ASAN,
TEST_WITH_ROCM,
TEST_WITH_SLOW_GRADCHECK,
)
from torch.utils import cpp_extension
@ -1397,7 +1397,7 @@ def get_selected_tests(options) -> List[ShardedTest]:
"PyTorch is built without LAPACK support.",
)
if is_slow_gradcheck_env():
if TEST_WITH_SLOW_GRADCHECK:
selected_tests = exclude_tests(
TESTS_NOT_USING_GRADCHECK,
selected_tests,