Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ version: 2.1
orbs:
win: circleci/windows@2.0.0

executors:
windows-gpu-prototype:
machine:
resource_class: windows.gpu.small.prototype
image: windows-server-2019-nvidia:201908-28
shell: bash.exe

commands:
checkout_merge:
description: "checkout merge branch"
Expand Down Expand Up @@ -184,6 +191,20 @@ jobs:
bash packaging/build_conda.sh
shell: powershell.exe

binary_win_conda_cuda:
<<: *binary_common
executor: windows-gpu-prototype
steps:
- checkout_merge
- run:
command: |
choco install miniconda3
(& "C:\tools\miniconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Invoke-Expression
conda activate base
conda install -yq conda-build "conda-package-handling!=1.5.0"
bash packaging/build_conda.sh
shell: powershell.exe

binary_macos_wheel:
<<: *binary_common
macos:
Expand Down Expand Up @@ -485,6 +506,10 @@ workflows:
name: torchvision_win_py3.6_cpu
python_version: "3.6"
cu_version: "cpu"
- binary_win_conda_cuda:
name: torchvision_win_py3.6_cu101
python_version: "3.6"
cu_version: "cu101"

nightly:
jobs:
Expand Down
25 changes: 25 additions & 0 deletions .circleci/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ version: 2.1
orbs:
win: circleci/windows@2.0.0

executors:
windows-gpu-prototype:
machine:
resource_class: windows.gpu.small.prototype
image: windows-server-2019-nvidia:201908-28
shell: bash.exe

commands:
checkout_merge:
description: "checkout merge branch"
Expand Down Expand Up @@ -184,6 +191,20 @@ jobs:
bash packaging/build_conda.sh
shell: powershell.exe

binary_win_conda_cuda:
<<: *binary_common
executor: windows-gpu-prototype
steps:
- checkout_merge
- run:
command: |
choco install miniconda3
(& "C:\tools\miniconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Invoke-Expression
conda activate base
conda install -yq conda-build "conda-package-handling!=1.5.0"
bash packaging/build_conda.sh
shell: powershell.exe

binary_macos_wheel:
<<: *binary_common
macos:
Expand Down Expand Up @@ -284,6 +305,10 @@ workflows:
name: torchvision_win_py3.6_cpu
python_version: "3.6"
cu_version: "cpu"
- binary_win_conda_cuda:
name: torchvision_win_py3.6_cu101
python_version: "3.6"
cu_version: "cu101"

nightly:
{%- endif %}
Expand Down
18 changes: 15 additions & 3 deletions packaging/pkg_helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,33 @@ setup_cuda() {
# Now work out the CUDA settings
case "$CU_VERSION" in
cu101)
export CUDA_HOME=/usr/local/cuda-10.1/
if [[ "$OSTYPE" == "msys" ]]; then
export CUDA_HOME="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1"
else
export CUDA_HOME=/usr/local/cuda-10.1/
fi
export FORCE_CUDA=1
# Hard-coding gencode flags is temporary situation until
# https://github.com/pytorch/pytorch/pull/23408 lands
export NVCC_FLAGS="-gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_50,code=compute_50"
;;
cu100)
export CUDA_HOME=/usr/local/cuda-10.0/
if [[ "$OSTYPE" == "msys" ]]; then
export CUDA_HOME="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.0"
else
export CUDA_HOME=/usr/local/cuda-10.0/
fi
export FORCE_CUDA=1
# Hard-coding gencode flags is temporary situation until
# https://github.com/pytorch/pytorch/pull/23408 lands
export NVCC_FLAGS="-gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_50,code=compute_50"
;;
cu92)
export CUDA_HOME=/usr/local/cuda-9.2/
if [[ "$OSTYPE" == "msys" ]]; then
export CUDA_HOME="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v9.2"
else
export CUDA_HOME=/usr/local/cuda-9.2/
fi
export FORCE_CUDA=1
export NVCC_FLAGS="-gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_50,code=compute_50"
;;
Expand Down
14 changes: 7 additions & 7 deletions packaging/torchvision/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
set TORCHVISION_BUILD_VERSION=%PKG_VERSION%
set TORCHVISION_BUILD_NUMBER=%PKG_BUILDNUM%

if not "%CUDA_VERSION%" == "None" (
set build_with_cuda=1
set desired_cuda=%CUDA_VERSION:~0,-1%.%CUDA_VERSION:~-1,1%
) else (
set build_with_cuda=
)
set build_with_cuda=

if "%build_with_cuda%" == "" goto cuda_flags_end
if "%CUDA_VERSION%" == "None" goto cuda_flags_end
if "%CUDA_VERSION%" == "cpu" goto cuda_flags_end
if "%CUDA_VERSION%" == "" goto cuda_flags_end

set build_with_cuda=1
set desired_cuda=%CUDA_VERSION:~0,-1%.%CUDA_VERSION:~-1,1%

set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%desired_cuda%
set CUDA_BIN_PATH=%CUDA_PATH%\bin
Expand Down