diff --git a/.github/scripts/unittest-windows/install.sh b/.github/scripts/unittest-windows/install.sh index 73934b8fd0..8cc7c10df0 100644 --- a/.github/scripts/unittest-windows/install.sh +++ b/.github/scripts/unittest-windows/install.sh @@ -32,6 +32,8 @@ fi printf "Installing PyTorch\n" pip install --pre torch --index-url https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/${wheel} +python -c "import torch; print(torch.__version__)" + torch_cuda=$(python -c "import torch; print(torch.cuda.is_available())") echo torch.cuda.is_available is $torch_cuda @@ -42,6 +44,12 @@ if [ ! -z "${CUDA_VERSION:-}" ] ; then fi fi +printf "Installing TorchCodec\n" +# torchcodec nightly has no Windows+CUDA wheels, so we'll use CPU-only +# torchcodec also under CUDA-enabled torch: +pip install --pre torchcodec --index-url https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/cpu +python -c "import torchcodec; print(torchcodec.__version__)" + # 2. Install torchaudio printf "* Installing fsspec\n" # TODO: is this required for torchaudio?? pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org fsspec diff --git a/.github/scripts/unittest-windows/run_test.sh b/.github/scripts/unittest-windows/run_test.sh index 25d8e14196..292fe1d2b0 100644 --- a/.github/scripts/unittest-windows/run_test.sh +++ b/.github/scripts/unittest-windows/run_test.sh @@ -12,5 +12,9 @@ python -m torch.utils.collect_env env | grep TORCHAUDIO || true cd test -pytest --continue-on-collection-errors --cov=torchaudio --junitxml=${RUNNER_TEST_RESULTS_DIR}/junit.xml -v --durations 20 torchaudio_unittest -k "not torchscript and not fairseq and not demucs and not librosa" +if [ -z "${CUDA_VERSION:-}" ] ; then + pytest --continue-on-collection-errors --cov=torchaudio --junitxml=${RUNNER_TEST_RESULTS_DIR}/junit.xml -v --durations 20 torchaudio_unittest -k "not torchscript and not fairseq and not demucs and not librosa" +else + pytest --continue-on-collection-errors --cov=torchaudio --junitxml=${RUNNER_TEST_RESULTS_DIR}/junit.xml -v --durations 20 torchaudio_unittest -k "not cpu and (cuda or gpu) and not torchscript and not fairseq and not demucs and not librosa" +fi coverage html diff --git a/.github/scripts/unittest-windows/setup_env.sh b/.github/scripts/unittest-windows/setup_env.sh index 8203a1d978..efea89f548 100644 --- a/.github/scripts/unittest-windows/setup_env.sh +++ b/.github/scripts/unittest-windows/setup_env.sh @@ -36,4 +36,4 @@ fi conda activate "${env_dir}" # 3. Install minimal build tools -conda install -y -c conda-forge cmake ninja +conda install -y -c conda-forge cmake ninja "ffmpeg<8" diff --git a/.github/workflows/unittest-windows-cpu.yml b/.github/workflows/unittest-windows-cpu.yml index f6a786fcc1..3b872a4715 100644 --- a/.github/workflows/unittest-windows-cpu.yml +++ b/.github/workflows/unittest-windows-cpu.yml @@ -1,4 +1,4 @@ -name: Unittests on Windows CPU +name: Unit-tests on Windows CPU on: pull_request: @@ -10,7 +10,7 @@ on: workflow_dispatch: jobs: - unittests-windows-cpu: + build: uses: pytorch/test-infra/.github/workflows/windows_job.yml@main with: repository: pytorch/audio @@ -21,7 +21,7 @@ jobs: git config --global --add safe.directory /__w/audio/audio # Set up Environment Variables - export PYTHON_VERSION="3.10" + export PYTHON_VERSION="3.11" export PIP_PROGRESS_BAR=off export CONDA_QUIET=1 unset CUDA_VERSION diff --git a/.github/workflows/unittest-windows-gpu.yml b/.github/workflows/unittest-windows-gpu.yml index b00a512956..2b0e66c171 100644 --- a/.github/workflows/unittest-windows-gpu.yml +++ b/.github/workflows/unittest-windows-gpu.yml @@ -1,4 +1,4 @@ -name: Unittests on Windows GPU +name: Unit-tests on Windows GPU on: pull_request: @@ -10,7 +10,7 @@ on: workflow_dispatch: jobs: - unittests-windows-gpu: + build: uses: pytorch/test-infra/.github/workflows/windows_job.yml@main with: repository: pytorch/audio