Skip to content

Commit 8fb5838

Browse files
authored
[v0.9.1] Remove special versioning suffix rules for CUDA 10.2 (#3603)
* packaging: Remove special versioning priveleges Adds a version suffix for CUDA 10.2 for ease of installing when installing from download.pytorch.org Signed-off-by: Eli Uriegas <[email protected]> * also include windows cmath fix Signed-off-by: Eli Uriegas <[email protected]> * remove comment Signed-off-by: Eli Uriegas <[email protected]> * fix indent Signed-off-by: Eli Uriegas <[email protected]> * actually add the script Signed-off-by: Eli Uriegas <[email protected]>
1 parent 046cabc commit 8fb5838

File tree

4 files changed

+66
-4
lines changed

4 files changed

+66
-4
lines changed

.circleci/config.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,11 @@ jobs:
214214
steps:
215215
- checkout_merge
216216
- designate_upload_channel
217+
- run:
218+
name: _HACK_ Install CUDA compatible cmath
219+
no_output_timeout: 1m
220+
command: |
221+
powershell .circleci/scripts/vs_install_cmath.ps1
217222
- run:
218223
name: Build conda packages
219224
no_output_timeout: 20m
@@ -241,6 +246,11 @@ jobs:
241246
steps:
242247
- checkout_merge
243248
- designate_upload_channel
249+
- run:
250+
name: _HACK_ Install CUDA compatible cmath
251+
no_output_timeout: 1m
252+
command: |
253+
powershell .circleci/scripts/vs_install_cmath.ps1
244254
- run:
245255
name: Build wheel packages
246256
command: |
@@ -548,6 +558,11 @@ jobs:
548558
steps:
549559
- checkout
550560
- designate_upload_channel
561+
- run:
562+
name: _HACK_ Install CUDA compatible cmath
563+
no_output_timeout: 1m
564+
command: |
565+
powershell .circleci/scripts/vs_install_cmath.ps1
551566
- run:
552567
name: Generate cache key
553568
# This will refresh cache on Sundays, nightly build should generate new cache.
@@ -589,6 +604,11 @@ jobs:
589604
steps:
590605
- checkout
591606
- designate_upload_channel
607+
- run:
608+
name: _HACK_ Install CUDA compatible cmath
609+
no_output_timeout: 1m
610+
command: |
611+
powershell .circleci/scripts/vs_install_cmath.ps1
592612
- run:
593613
name: Generate cache key
594614
# This will refresh cache on Sundays, nightly build should generate new cache.
@@ -718,6 +738,11 @@ jobs:
718738
steps:
719739
- checkout_merge
720740
- designate_upload_channel
741+
- run:
742+
name: _HACK_ Install CUDA compatible cmath
743+
no_output_timeout: 1m
744+
command: |
745+
powershell .circleci/scripts/vs_install_cmath.ps1
721746
- run:
722747
command: |
723748
set -ex
@@ -731,6 +756,11 @@ jobs:
731756
steps:
732757
- checkout_merge
733758
- designate_upload_channel
759+
- run:
760+
name: _HACK_ Install CUDA compatible cmath
761+
no_output_timeout: 1m
762+
command: |
763+
powershell .circleci/scripts/vs_install_cmath.ps1
734764
- run:
735765
command: |
736766
set -ex

.circleci/config.yml.in

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,11 @@ jobs:
214214
steps:
215215
- checkout_merge
216216
- designate_upload_channel
217+
- run:
218+
name: _HACK_ Install CUDA compatible cmath
219+
no_output_timeout: 1m
220+
command: |
221+
powershell .circleci/scripts/vs_install_cmath.ps1
217222
- run:
218223
name: Build conda packages
219224
no_output_timeout: 20m
@@ -241,6 +246,11 @@ jobs:
241246
steps:
242247
- checkout_merge
243248
- designate_upload_channel
249+
- run:
250+
name: _HACK_ Install CUDA compatible cmath
251+
no_output_timeout: 1m
252+
command: |
253+
powershell .circleci/scripts/vs_install_cmath.ps1
244254
- run:
245255
name: Build wheel packages
246256
command: |
@@ -548,6 +558,11 @@ jobs:
548558
steps:
549559
- checkout
550560
- designate_upload_channel
561+
- run:
562+
name: _HACK_ Install CUDA compatible cmath
563+
no_output_timeout: 1m
564+
command: |
565+
powershell .circleci/scripts/vs_install_cmath.ps1
551566
- run:
552567
name: Generate cache key
553568
# This will refresh cache on Sundays, nightly build should generate new cache.
@@ -589,6 +604,11 @@ jobs:
589604
steps:
590605
- checkout
591606
- designate_upload_channel
607+
- run:
608+
name: _HACK_ Install CUDA compatible cmath
609+
no_output_timeout: 1m
610+
command: |
611+
powershell .circleci/scripts/vs_install_cmath.ps1
592612
- run:
593613
name: Generate cache key
594614
# This will refresh cache on Sundays, nightly build should generate new cache.
@@ -718,6 +738,11 @@ jobs:
718738
steps:
719739
- checkout_merge
720740
- designate_upload_channel
741+
- run:
742+
name: _HACK_ Install CUDA compatible cmath
743+
no_output_timeout: 1m
744+
command: |
745+
powershell .circleci/scripts/vs_install_cmath.ps1
721746
- run:
722747
command: |
723748
set -ex
@@ -731,6 +756,11 @@ jobs:
731756
steps:
732757
- checkout_merge
733758
- designate_upload_channel
759+
- run:
760+
name: _HACK_ Install CUDA compatible cmath
761+
no_output_timeout: 1m
762+
command: |
763+
powershell .circleci/scripts/vs_install_cmath.ps1
734764
- run:
735765
command: |
736766
set -ex
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
$CMATH_DOWNLOAD_LINK = "https://raw.githubusercontent.com/microsoft/STL/12c684bba78f9b032050526abdebf14f58ca26a3/stl/inc/cmath"
2+
$VC14_28_INSTALL_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include"
3+
4+
curl.exe --retry 3 -kL $CMATH_DOWNLOAD_LINK --output "$home\cmath"
5+
Move-Item -Path "$home\cmath" -Destination "$VC14_28_INSTALL_PATH" -Force

packaging/pkg_helpers.bash

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ setup_cuda() {
3535
export WHEEL_DIR=""
3636
# Wheel builds need suffixes (but not if they're on OS X, which never has suffix)
3737
if [[ "$BUILD_TYPE" == "wheel" ]] && [[ "$(uname)" != Darwin ]]; then
38-
# The default CUDA has no suffix
39-
if [[ "$CU_VERSION" != "cu102" ]]; then
40-
export PYTORCH_VERSION_SUFFIX="+$CU_VERSION"
41-
fi
38+
export PYTORCH_VERSION_SUFFIX="+$CU_VERSION"
4239
# Match the suffix scheme of pytorch, unless this package does not have
4340
# CUDA builds (in which case, use default)
4441
if [[ -z "$NO_CUDA_PACKAGE" ]]; then

0 commit comments

Comments
 (0)