diff --git a/.github/workflows/build_windows_pytorch_wheels.yml b/.github/workflows/build_windows_pytorch_wheels.yml index ae3cdfbda..f7076e803 100644 --- a/.github/workflows/build_windows_pytorch_wheels.yml +++ b/.github/workflows/build_windows_pytorch_wheels.yml @@ -105,8 +105,9 @@ jobs: python ./external-builds/pytorch/pytorch_audio_repo.py checkout \ --repo ${{ env.CHECKOUT_ROOT }}/audio \ --repo-hashtag main - # TODO(#910): Support torchvision on Windows - # python ./external-builds/pytorch/pytorch_vision_repo.py checkout + python ./external-builds/pytorch/pytorch_vision_repo.py checkout \ + --repo ${{ env.CHECKOUT_ROOT }}/vision \ + --repo-hashtag main - name: Determine optional arguments passed to `build_prod_wheels.py` if: ${{ inputs.rocm_version }} @@ -128,6 +129,7 @@ jobs: --index-url "${{ inputs.cloudfront_url }}/${{ inputs.amdgpu_family }}/" ^ --pytorch-dir ${{ env.CHECKOUT_ROOT }}/torch ^ --pytorch-audio-dir ${{ env.CHECKOUT_ROOT }}/audio ^ + --pytorch-vision-dir ${{ env.CHECKOUT_ROOT }}/vision ^ --clean ^ --output-dir ${{ env.PACKAGE_DIST_DIR }} ^ ${{ env.optional_build_prod_arguments }} diff --git a/external-builds/pytorch/README.md b/external-builds/pytorch/README.md index 82c72fb44..692c98ac0 100644 --- a/external-builds/pytorch/README.md +++ b/external-builds/pytorch/README.md @@ -25,7 +25,7 @@ patches locally until they can be upstreamed. See the | ------------------------ | ------------- | --------------------------------------------------------------------- | | PyTorch | ✅ Supported | ✅ Supported | | torchaudio | ✅ Supported | ✅ Supported | -| torchvision | ✅ Supported | 🟡 In progress ([#910](https://github.com/ROCm/TheRock/issues/910)) | +| torchvision | ✅ Supported | ✅ Supported | | Flash attention (Triton) | ✅ Supported | 🟡 In progress ([#1040](https://github.com/ROCm/TheRock/issues/1040)) | ## Build instructions @@ -79,7 +79,7 @@ Now checkout repositories: ```bash python pytorch_torch_repo.py checkout --repo C:/b/pytorch --repo-hashtag main python pytorch_audio_repo.py checkout --repo C:/b/audio --repo-hashtag main - # TODO(#910): Support torchvision on Windows + python pytorch_vision_repo.py checkout --repo C:/b/vision --repo-hashtag main ``` Now note the gfx target you want to build for and then... @@ -107,6 +107,7 @@ mix/match build steps. --install-rocm --index-url https://d2awnip2yjpvqn.cloudfront.net/v2/gfx110X-dgpu/ \ --pytorch-dir C:/b/pytorch \ --pytorch-audio-dir C:/b/audio \ + --pytorch-vision-dir C:/b/vision \ --output-dir %HOME%/tmp/pyout ``` diff --git a/external-builds/pytorch/build_prod_wheels.py b/external-builds/pytorch/build_prod_wheels.py index c0203e132..b9b2d37d6 100755 --- a/external-builds/pytorch/build_prod_wheels.py +++ b/external-builds/pytorch/build_prod_wheels.py @@ -695,6 +695,13 @@ def do_build_pytorch_vision( } ) + if is_windows: + env.update( + { + "DISTUTILS_USE_SDK": "1", + } + ) + remove_dir_if_exists(pytorch_vision_dir / "dist") if args.clean: remove_dir_if_exists(pytorch_vision_dir / "build")