From 623a48ba1ef17e61d84a577b04098372aeda2e81 Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Wed, 24 Mar 2021 14:30:20 -0700 Subject: [PATCH 1/5] 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 --- packaging/pkg_helpers.bash | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packaging/pkg_helpers.bash b/packaging/pkg_helpers.bash index c5e55423c79..04728d612fb 100644 --- a/packaging/pkg_helpers.bash +++ b/packaging/pkg_helpers.bash @@ -36,9 +36,7 @@ setup_cuda() { # Wheel builds need suffixes (but not if they're on OS X, which never has suffix) if [[ "$BUILD_TYPE" == "wheel" ]] && [[ "$(uname)" != Darwin ]]; then # The default CUDA has no suffix - if [[ "$CU_VERSION" != "cu102" ]]; then - export PYTORCH_VERSION_SUFFIX="+$CU_VERSION" - fi + export PYTORCH_VERSION_SUFFIX="+$CU_VERSION" # Match the suffix scheme of pytorch, unless this package does not have # CUDA builds (in which case, use default) if [[ -z "$NO_CUDA_PACKAGE" ]]; then From 62d6bb064922b1a7704042f3243dd14d35e0a553 Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Wed, 24 Mar 2021 16:29:05 -0700 Subject: [PATCH 2/5] also include windows cmath fix Signed-off-by: Eli Uriegas --- .circleci/config.yml | 30 ++++++++++++++++++++++++++++++ .circleci/config.yml.in | 30 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d2adfb00592..4e4b055af52 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -214,6 +214,11 @@ jobs: steps: - checkout_merge - designate_upload_channel + - run: + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: name: Build conda packages no_output_timeout: 20m @@ -241,6 +246,11 @@ jobs: steps: - checkout_merge - designate_upload_channel + - run: + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: name: Build wheel packages command: | @@ -548,6 +558,11 @@ jobs: steps: - checkout - designate_upload_channel + - run: + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: name: Generate cache key # This will refresh cache on Sundays, nightly build should generate new cache. @@ -589,6 +604,11 @@ jobs: steps: - checkout - designate_upload_channel + - run: + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: name: Generate cache key # This will refresh cache on Sundays, nightly build should generate new cache. @@ -718,6 +738,11 @@ jobs: steps: - checkout_merge - designate_upload_channel + - run: + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: command: | set -ex @@ -731,6 +756,11 @@ jobs: steps: - checkout_merge - designate_upload_channel + - run: + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: command: | set -ex diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index f80062c53c7..bf1a763087d 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -214,6 +214,11 @@ jobs: steps: - checkout_merge - designate_upload_channel + - run: + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: name: Build conda packages no_output_timeout: 20m @@ -241,6 +246,11 @@ jobs: steps: - checkout_merge - designate_upload_channel + - run: + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: name: Build wheel packages command: | @@ -548,6 +558,11 @@ jobs: steps: - checkout - designate_upload_channel + - run: + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: name: Generate cache key # This will refresh cache on Sundays, nightly build should generate new cache. @@ -589,6 +604,11 @@ jobs: steps: - checkout - designate_upload_channel + - run: + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: name: Generate cache key # This will refresh cache on Sundays, nightly build should generate new cache. @@ -718,6 +738,11 @@ jobs: steps: - checkout_merge - designate_upload_channel + - run: + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: command: | set -ex @@ -731,6 +756,11 @@ jobs: steps: - checkout_merge - designate_upload_channel + - run: + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: command: | set -ex From cffa5257c5e16020415b7fb3cf554cd7fcf3af75 Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Wed, 24 Mar 2021 16:29:45 -0700 Subject: [PATCH 3/5] remove comment Signed-off-by: Eli Uriegas --- packaging/pkg_helpers.bash | 1 - 1 file changed, 1 deletion(-) diff --git a/packaging/pkg_helpers.bash b/packaging/pkg_helpers.bash index 04728d612fb..dfa0a9ae476 100644 --- a/packaging/pkg_helpers.bash +++ b/packaging/pkg_helpers.bash @@ -35,7 +35,6 @@ setup_cuda() { export WHEEL_DIR="" # Wheel builds need suffixes (but not if they're on OS X, which never has suffix) if [[ "$BUILD_TYPE" == "wheel" ]] && [[ "$(uname)" != Darwin ]]; then - # The default CUDA has no suffix export PYTORCH_VERSION_SUFFIX="+$CU_VERSION" # Match the suffix scheme of pytorch, unless this package does not have # CUDA builds (in which case, use default) From eb9607ef96a362f04f8f0e0a6a6df67b963164f2 Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Wed, 24 Mar 2021 16:30:58 -0700 Subject: [PATCH 4/5] fix indent Signed-off-by: Eli Uriegas --- .circleci/config.yml | 48 ++++++++++++++++++++--------------------- .circleci/config.yml.in | 48 ++++++++++++++++++++--------------------- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4e4b055af52..a06d379c2d1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -215,10 +215,10 @@ jobs: - checkout_merge - designate_upload_channel - run: - name: _HACK_ Install CUDA compatible cmath - no_output_timeout: 1m - command: | - powershell .circleci/scripts/vs_install_cmath.ps1 + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: name: Build conda packages no_output_timeout: 20m @@ -247,10 +247,10 @@ jobs: - checkout_merge - designate_upload_channel - run: - name: _HACK_ Install CUDA compatible cmath - no_output_timeout: 1m - command: | - powershell .circleci/scripts/vs_install_cmath.ps1 + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: name: Build wheel packages command: | @@ -559,10 +559,10 @@ jobs: - checkout - designate_upload_channel - run: - name: _HACK_ Install CUDA compatible cmath - no_output_timeout: 1m - command: | - powershell .circleci/scripts/vs_install_cmath.ps1 + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: name: Generate cache key # This will refresh cache on Sundays, nightly build should generate new cache. @@ -605,10 +605,10 @@ jobs: - checkout - designate_upload_channel - run: - name: _HACK_ Install CUDA compatible cmath - no_output_timeout: 1m - command: | - powershell .circleci/scripts/vs_install_cmath.ps1 + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: name: Generate cache key # This will refresh cache on Sundays, nightly build should generate new cache. @@ -739,10 +739,10 @@ jobs: - checkout_merge - designate_upload_channel - run: - name: _HACK_ Install CUDA compatible cmath - no_output_timeout: 1m - command: | - powershell .circleci/scripts/vs_install_cmath.ps1 + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: command: | set -ex @@ -757,10 +757,10 @@ jobs: - checkout_merge - designate_upload_channel - run: - name: _HACK_ Install CUDA compatible cmath - no_output_timeout: 1m - command: | - powershell .circleci/scripts/vs_install_cmath.ps1 + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: command: | set -ex diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index bf1a763087d..d2c8d0f48be 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -215,10 +215,10 @@ jobs: - checkout_merge - designate_upload_channel - run: - name: _HACK_ Install CUDA compatible cmath - no_output_timeout: 1m - command: | - powershell .circleci/scripts/vs_install_cmath.ps1 + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: name: Build conda packages no_output_timeout: 20m @@ -247,10 +247,10 @@ jobs: - checkout_merge - designate_upload_channel - run: - name: _HACK_ Install CUDA compatible cmath - no_output_timeout: 1m - command: | - powershell .circleci/scripts/vs_install_cmath.ps1 + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: name: Build wheel packages command: | @@ -559,10 +559,10 @@ jobs: - checkout - designate_upload_channel - run: - name: _HACK_ Install CUDA compatible cmath - no_output_timeout: 1m - command: | - powershell .circleci/scripts/vs_install_cmath.ps1 + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: name: Generate cache key # This will refresh cache on Sundays, nightly build should generate new cache. @@ -605,10 +605,10 @@ jobs: - checkout - designate_upload_channel - run: - name: _HACK_ Install CUDA compatible cmath - no_output_timeout: 1m - command: | - powershell .circleci/scripts/vs_install_cmath.ps1 + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: name: Generate cache key # This will refresh cache on Sundays, nightly build should generate new cache. @@ -739,10 +739,10 @@ jobs: - checkout_merge - designate_upload_channel - run: - name: _HACK_ Install CUDA compatible cmath - no_output_timeout: 1m - command: | - powershell .circleci/scripts/vs_install_cmath.ps1 + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: command: | set -ex @@ -757,10 +757,10 @@ jobs: - checkout_merge - designate_upload_channel - run: - name: _HACK_ Install CUDA compatible cmath - no_output_timeout: 1m - command: | - powershell .circleci/scripts/vs_install_cmath.ps1 + name: _HACK_ Install CUDA compatible cmath + no_output_timeout: 1m + command: | + powershell .circleci/scripts/vs_install_cmath.ps1 - run: command: | set -ex From ed5dfa29c317ea5dcd46a78fff2bfa531d635f6b Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Wed, 24 Mar 2021 16:39:34 -0700 Subject: [PATCH 5/5] actually add the script Signed-off-by: Eli Uriegas --- .circleci/scripts/vs_install_cmath.ps1 | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .circleci/scripts/vs_install_cmath.ps1 diff --git a/.circleci/scripts/vs_install_cmath.ps1 b/.circleci/scripts/vs_install_cmath.ps1 new file mode 100644 index 00000000000..c2998eba252 --- /dev/null +++ b/.circleci/scripts/vs_install_cmath.ps1 @@ -0,0 +1,5 @@ +$CMATH_DOWNLOAD_LINK = "https://raw.githubusercontent.com/microsoft/STL/12c684bba78f9b032050526abdebf14f58ca26a3/stl/inc/cmath" +$VC14_28_INSTALL_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include" + +curl.exe --retry 3 -kL $CMATH_DOWNLOAD_LINK --output "$home\cmath" +Move-Item -Path "$home\cmath" -Destination "$VC14_28_INSTALL_PATH" -Force