mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
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:
parent
24aa8b9b9a
commit
ece19bf018
2 changed files with 2 additions and 6 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -4068,10 +4068,6 @@ GRADCHECK_NONDET_TOL = 1e-12
|
|||
|
||||
TestEnvironment.def_flag("TEST_WITH_SLOW_GRADCHECK", env_var="PYTORCH_TEST_WITH_SLOW_GRADCHECK")
|
||||
|
||||
# TODO: Remove once run_test.py is updated to use the flag instead.
|
||||
def is_slow_gradcheck_env() -> bool:
|
||||
return TEST_WITH_SLOW_GRADCHECK
|
||||
|
||||
skipIfSlowGradcheckEnv = unittest.skipIf(
|
||||
TEST_WITH_SLOW_GRADCHECK,
|
||||
"Tests that don't use gradcheck don't need to run on slow_gradcheck CI"
|
||||
|
|
|
|||
Loading…
Reference in a new issue