From 6edd5d14bc619a3576ecf7400a5c0a290a83d44d Mon Sep 17 00:00:00 2001 From: vfdev Date: Fri, 21 Oct 2022 14:03:43 +0200 Subject: [PATCH] Revert "[proto] Enable GPU tests on prototype (#6665)" This reverts commit d0de55db37447ff86ba9772fcaf15111a6e969b7. --- .github/workflows/prototype-tests-gpu.yml | 80 -------------------- test/test_prototype_transforms_functional.py | 5 +- 2 files changed, 1 insertion(+), 84 deletions(-) delete mode 100644 .github/workflows/prototype-tests-gpu.yml diff --git a/.github/workflows/prototype-tests-gpu.yml b/.github/workflows/prototype-tests-gpu.yml deleted file mode 100644 index 1183ccd85d8..00000000000 --- a/.github/workflows/prototype-tests-gpu.yml +++ /dev/null @@ -1,80 +0,0 @@ -# prototype-tests.yml adapted for self-hosted with gpu -name: tests-gpu - -on: - pull_request: - -jobs: - prototype: - strategy: - fail-fast: false - - runs-on: [self-hosted, linux.4xlarge.nvidia.gpu] - container: - image: pytorch/conda-builder:cuda116 - options: --gpus all - - steps: - - name: Run nvidia-smi - run: nvidia-smi - - - name: Upgrade system packages - run: python -m pip install --upgrade pip setuptools wheel - - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install PyTorch nightly builds - run: pip install --progress-bar=off --pre torch torchdata --extra-index-url https://download.pytorch.org/whl/nightly/cu116/ - - - name: Install torchvision - run: pip install --progress-bar=off --no-build-isolation --editable . - - - name: Install other prototype dependencies - run: pip install --progress-bar=off scipy pycocotools h5py iopath - - - name: Install test requirements - run: pip install --progress-bar=off pytest pytest-mock pytest-cov - - - name: Mark setup as complete - id: setup - run: python -c "import torch; exit(not torch.cuda.is_available())" - - - name: Run prototype features tests - shell: bash - run: | - pytest \ - --durations=20 \ - --cov=torchvision/prototype/features \ - --cov-report=term-missing \ - test/test_prototype_features*.py - - - name: Run prototype datasets tests - if: success() || ( failure() && steps.setup.conclusion == 'success' ) - shell: bash - run: | - pytest \ - --durations=20 \ - --cov=torchvision/prototype/datasets \ - --cov-report=term-missing \ - test/test_prototype_datasets*.py - - - name: Run prototype transforms tests - if: success() || ( failure() && steps.setup.conclusion == 'success' ) - shell: bash - run: | - pytest \ - --durations=20 \ - --cov=torchvision/prototype/transforms \ - --cov-report=term-missing \ - test/test_prototype_transforms*.py - - - name: Run prototype models tests - if: success() || ( failure() && steps.setup.conclusion == 'success' ) - shell: bash - run: | - pytest \ - --durations=20 \ - --cov=torchvision/prototype/models \ - --cov-report=term-missing \ - test/test_prototype_models*.py diff --git a/test/test_prototype_transforms_functional.py b/test/test_prototype_transforms_functional.py index 079ef3bd192..3423006e2eb 100644 --- a/test/test_prototype_transforms_functional.py +++ b/test/test_prototype_transforms_functional.py @@ -174,10 +174,7 @@ def test_cuda_vs_cpu(self, info, args_kwargs): output_cpu = info.kernel(input_cpu, *other_args, **kwargs) output_cuda = info.kernel(input_cuda, *other_args, **kwargs) - try: - assert_close(output_cuda, output_cpu, check_device=False, **info.closeness_kwargs) - except AssertionError: - pytest.xfail("CUDA vs CPU tolerance issue to be fixed") + assert_close(output_cuda, output_cpu, check_device=False, **info.closeness_kwargs) @sample_inputs @pytest.mark.parametrize("device", cpu_and_gpu())