diff --git a/Makefile b/Makefile index 5bd8cf8f4dd..58d2121d6d3 100644 --- a/Makefile +++ b/Makefile @@ -117,11 +117,11 @@ test-examples-tensorflow: # PyTorch backend install-torch-test: pip install -U pip - pip install -e .[torch] - pip install -r tests/torch/requirements.txt + pip install -e .[torch] --index-url https://download.pytorch.org/whl/cu118 --extra-index-url=https://pypi.org/simple # ticket 119128 + pip install -r tests/torch/requirements.txt --index-url https://download.pytorch.org/whl/cu118 --extra-index-url=https://pypi.org/simple pip install -r tests/cross_fw/install/requirements.txt pip install -r tests/cross_fw/examples/requirements.txt - pip install -r examples/torch/requirements.txt + pip install -r examples/torch/requirements.txt --index-url https://download.pytorch.org/whl/cu118 --extra-index-url=https://pypi.org/simple install-torch-dev: install-torch-test install-pre-commit install-pylint pip install -r examples/post_training_quantization/torch/mobilenet_v2/requirements.txt diff --git a/tests/torch/test_sanity_sample.py b/tests/torch/test_sanity_sample.py index 42da1e08774..9e206c0b127 100644 --- a/tests/torch/test_sanity_sample.py +++ b/tests/torch/test_sanity_sample.py @@ -174,12 +174,6 @@ def set_num_threads_locally(n=1): torch.set_num_threads(old_n) -def _run_with_xfail_119128(runner: Command): - returncode = runner.run(assert_returncode_zero=False) - if returncode == 139: - pytest.xfail("Bug 119128: sporadic segment fault on backward") - - @pytest.mark.nightly class TestSanitySample: @staticmethod @@ -289,7 +283,7 @@ def test_pretrained_model_train(config, tmp_path, multiprocessing_distributed, c ) runner = Command(create_command_line(args, config["sample_type"]), env=ROOT_PYTHONPATH_ENV) - _run_with_xfail_119128(runner) + runner.run(assert_returncode_zero=False) last_checkpoint_path = os.path.join(checkpoint_save_dir, get_run_name(config_factory.config) + "_last.pth") assert os.path.exists(last_checkpoint_path) if "compression" in config["sample_config"]: @@ -374,7 +368,7 @@ def test_resume(request, config, tmp_path, multiprocessing_distributed, case_com args["--multiprocessing-distributed"] = True runner = Command(create_command_line(args, config["sample_type"]), env=ROOT_PYTHONPATH_ENV) - _run_with_xfail_119128(runner) + runner.run(assert_returncode_zero=False) last_checkpoint_path = os.path.join(checkpoint_save_dir, get_run_name(config_factory.config) + "_last.pth") assert os.path.exists(last_checkpoint_path) if "compression" in config["sample_config"]: @@ -590,7 +584,7 @@ def test_accuracy_aware_training_pipeline(accuracy_aware_config, tmp_path, multi args["--multiprocessing-distributed"] = True runner = Command(create_command_line(args, accuracy_aware_config["sample_type"]), env=ROOT_PYTHONPATH_ENV) - _run_with_xfail_119128(runner) + runner.run(assert_returncode_zero=False) checkpoint_save_dir = log_dir / get_run_name(config_factory.config) aa_checkpoint_path = get_accuracy_aware_checkpoint_dir_path(checkpoint_save_dir)