• Home
  • Raw
  • Download

Lines Matching +full:build +full:- +full:docker +full:- +full:xpu

89 # https://github.com/pytorch/pytorch/pull/85770 added file-granularity parallel testing.
95 # Further, ROCm self-hosted runners have up to 4 GPUs.
288 "TEST_REPORT_SOURCE_OVERRIDE": "dist-mpi",
293 "TEST_REPORT_SOURCE_OVERRIDE": "dist-nccl",
298 "TEST_REPORT_SOURCE_OVERRIDE": "dist-gloo",
303 "TEST_REPORT_SOURCE_OVERRIDE": "dist-ucc",
310 # https://stackoverflow.com/questions/2549939/get-signal-names-from-numbers-in-python
316 Ninja (https://ninja-build.org) is required for some of the C++ extensions
319 `run_test.py --exclude test_cpp_extensions_aot_ninja test_cpp_extensions_jit`.
368 executable = ["coverage", "run", "--parallel-mode", "--source=torch"]
374 executable = [sys.executable, "-bb"]
389 ) -> int:
404 # NB: Rerun disabled tests depends on pytest-flakefinder and it doesn't work with
405 # pytest-cpp atm. We also don't have support to disable C++ test yet, so it's ok
418 f"--shard-id={test_module.shard}",
419 f"--num-shards={test_module.num_shards}",
425 unittest_args.append(f'-{"v" * options.verbose}') # in case of pytest
429 arg for arg in unittest_args if not arg.startswith("--run-parallel")
436 # If using pytest, replace -f with equivalent -x
446 replacement = {"-f": "-x"}
451 unittest_args.extend(["--showlocals", "--tb=long", "--color=yes"])
453 unittest_args.append("--locals")
458 ci_args = ["--import-slow-tests", "--import-disabled-tests"]
460 ci_args.append("--rerun-disabled-tests")
470 unittest_args = [arg for arg in unittest_args if "--reruns" not in arg]
497 # Can't call `python -m unittest test_*` here because it doesn't run code
501 os.makedirs(REPO_ROOT / "test" / "test-reports", exist_ok=True)
504 dir=REPO_ROOT / "test" / "test-reports",
512 "--subprocess" not in command
515 and "-n" not in command
548 command.extend([f"--sc={stepcurrent_key}", "--print-items"])
562 # binary files under build/bin that are not C++ test at the time of
590 # Run the test with -x to stop at first failure. Rerun the test by itself.
607 print_items = ["--print-items"]
608 sc_command = f"--sc={stepcurrent_key}"
620 if ret_code == 0 and not sc_command.startswith("--rs="):
622 signal_name = f" ({SIGNALS_TO_NAMES_DICT[-ret_code]})" if ret_code < 0 else ""
645 sc_command = f"--scs={stepcurrent_key}"
653 sc_command = f"--scs={stepcurrent_key}"
656 "continuing with the rest of the tests due to continue-through-error being set"
660 sc_command = f"--rs={stepcurrent_key}"
664 consistent_failures = [x[1:-1] for x in num_failures.keys() if num_failures[x] >= 3]
665 flaky_failures = [x[1:-1] for x in num_failures.keys() if 0 < num_failures[x] < 3]
679 test_module, test_directory, options, extra_unittest_args=["--subprocess"]
693 # Wipe the build folder, if it exists already
695 cpp_extensions_test_build_dir = os.path.join(cpp_extensions_test_dir, "build")
699 # Build the test cpp extensions modules
702 cmd = [sys.executable, "setup.py", "install", "--root", "./install"]
728 # install directory is the one that is named site-packages
731 if "-packages" in directory:
761 # Wipe the build folder, if it exists already
763 cpp_extensions_test_build_dir = os.path.join(cpp_extensions_test_dir, "build")
767 # Build the test cpp extensions modules
768 cmd = [sys.executable, "setup.py", "install", "--root", "./install"]
779 # install directory is the one that is named site-packages
782 if "-packages" in directory:
798 # MPI tests are broken with Python-3.9
800 "command -v mpiexec", shell=True
803 print_to_stderr("MPI not available -- MPI backend tests will be skipped")
829 # test mpiexec for --noprefix option
832 "--allow-run-as-root"
834 'mpiexec --allow-run-as-root -n 1 bash -c ""',
843 "--noprefix"
845 f'mpiexec {allowrunasroot_opt} -n 1 --noprefix bash -c ""',
854 mpiexec = ["mpiexec", "-n", "3", noprefix_opt, allowrunasroot_opt]
864 extra_unittest_args=["--subprocess"],
887 # For now disable all feature-conditional tests
1006 ) -> None:
1011 new_file = "test/test-reports/" + sanitize_file_name(
1041 # When under rerun-disabled-tests mode, run the same tests multiple times to determine their
1042 # flakiness status. Default to 50 re-runs
1043 rerun_options = ["--flake-finder", f"--flake-runs={count}"]
1045 # When under the normal mode, retry a failed test 2 more times. -x means stop at the first
1047 rerun_options = ["-x", "--reruns=2"]
1050 "-vv",
1051 "-rfEX",
1056 pytest_args.extend(["-p", "no:xdist", "--use-pytest"])
1058 # Use pytext-dist to run C++ tests in parallel as running them sequentially using run_test
1060 pytest_args.extend(["-n", str(NUM_PROCS)])
1066 pytest_args.extend(["--junit-xml-reruns", test_report_path])
1069 pytest_args.extend(["-k", options.pytest_k_expr])
1083 test_reports_dir = str(REPO_ROOT / "test/test-reports")
1130 "-v",
1131 "--verbose",
1134 help="Print verbose information and test-by-test results",
1138 "--showlocals",
1145 "--showlocals",
1150 parser.add_argument("--no-showlocals", dest="showlocals", action="store_false")
1151 parser.add_argument("--jit", "--jit", action="store_true", help="run all jit tests")
1153 "--distributed-tests",
1154 "--distributed-tests",
1159 "--functorch",
1160 "--functorch",
1169 "--mps",
1170 "--mps",
1175 "--xpu",
1176 "--xpu",
1178 help=("If this flag is present, we will run xpu tests except XPU_BLOCK_LIST"),
1181 "--cpp",
1182 "--cpp",
1187 "-core",
1188 "--core",
1194 "--onnx",
1195 "--onnx",
1203 "-k",
1204 "--pytest-k-expr",
1206 help="Pass to pytest as its -k expr argument",
1209 "-c",
1210 "--coverage",
1216 "-i",
1217 "--include",
1226 "-x",
1227 "--exclude",
1235 "--ignore-win-blocklist",
1241 # "--determine-from",
1245 "--continue-through-error",
1246 "--keep-going",
1252 "--pipe-logs",
1258 "--enable-timeout",
1264 "--enable-td",
1281 and "xpu" not in BUILD_ENVIRONMENT
1286 "--shard",
1290 "--shard 2 3 will break up the selected tests into 3 shards and run the tests "
1294 "--exclude-jit-executor",
1299 "--exclude-torch-export-tests",
1304 "--exclude-distributed-tests",
1309 "--exclude-inductor-tests",
1314 "--dry-run",
1319 "--xdoctest-command",
1329 "--no-translation-validation",
1336 "--dynamo",
1341 "--inductor",
1347 if "--" in extra:
1348 extra.remove("--")
1368 def must_serial(file: Union[str, ShardedTest]) -> bool:
1388 def get_selected_tests(options) -> List[str]:
1402 # Filter to only run core tests when --core option is specified
1408 # Filter to only run functorch tests when --functorch option is specified
1425 if options.xpu:
1426 selected_tests = exclude_tests(XPU_BLOCKLIST, selected_tests, "on XPU")
1428 # Exclude all xpu specifc tests otherwise
1431 # Filter to only run onnx tests when --onnx option is specified
1513 def load_test_times_from_file(file: str) -> Dict[str, Any]:
1531 f"::warning:: Gathered no stats from artifacts for {build_environment} build env"
1532 … f" and {test_config} test config. Using default build env and {test_config} test config instead."
1537 … f"::warning:: Gathered no stats from artifacts for build env {build_environment} build env"
1538 … f" and {test_config} test config. Using default build env and default test config instead."
1545 ) -> Dict[str, float]:
1551 ) -> Dict[str, Dict[str, float]]:
1555 def get_sharding_opts(options) -> Tuple[int, int]:
1574 ) -> Tuple[float, List[ShardedTest]]:
1586 return shards[which_shard - 1]
1596 ) -> Optional[TestFailure]:
1615 # return code -N, where N is the signal number.
1616 signal_name = SIGNALS_TO_NAMES_DICT[-return_code]
1628 ) -> None:
1646 # full-fledge ptest plugin instead
1678 … "\n\nTip: You can keep running tests even on failure by passing --keep-going to run_test.py.\n"
1679 "If running on CI, add the 'keep-going' label to your PR and rerun your jobs."
1701 options_clone.additional_args.extend(["-m", "serial"])
1716 options_clone.additional_args.extend(["-m", "not serial"])
1733 def check_pip_packages() -> None:
1735 "pytest-rerunfailures",
1736 "pytest-flakefinder",
1737 "pytest-xdist",
1743 … f"Missing pip dependency: {package}, please run `pip install -r .ci/docker/requirements-ci.txt`"
1764 os.makedirs(REPO_ROOT / "test" / "test-reports", exist_ok=True)
1841 elapsed_time = time.time() - start_time