Add magma debug version for Windows
authorpeter <peterghost86@gmail.com>
Thu, 14 Mar 2019 17:05:53 +0000 (10:05 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 14 Mar 2019 17:15:57 +0000 (10:15 -0700)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/18008

Differential Revision: D14455117

Pulled By: soumith

fbshipit-source-id: 29d9a2e0b36d72bece0bb1870bbdc740c4d1f9d6

.jenkins/pytorch/win-build.sh
docs/source/notes/windows.rst

index 60ef43f..9f0ef93 100755 (executable)
@@ -41,6 +41,12 @@ EOL
 
 cat >$TMP_DIR/ci_scripts/build_pytorch.bat <<EOL
 
+if "%DEBUG%" == "1" (
+  set BUILD_TYPE=debug
+) ELSE (
+  set BUILD_TYPE=release
+)
+
 set PATH=C:\\Program Files\\CMake\\bin;C:\\Program Files\\7-Zip;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Amazon\\AWSCLI;%PATH%
 
 :: Install MKL
@@ -58,11 +64,11 @@ set LIB=%TMP_DIR_WIN%\\mkl\\lib;%LIB
 :: Install MAGMA
 if "%REBUILD%"=="" (
   if "%BUILD_ENVIRONMENT%"=="" (
-    curl -k https://s3.amazonaws.com/ossci-windows/magma_2.5.0_cuda90_release.7z --output %TMP_DIR_WIN%\\magma_2.5.0_cuda90_release.7z
+    curl -k https://s3.amazonaws.com/ossci-windows/magma_2.5.0_cuda90_%BUILD_TYPE%.7z --output %TMP_DIR_WIN%\\magma_2.5.0_cuda90_%BUILD_TYPE%.7z
   ) else (
-    aws s3 cp s3://ossci-windows/magma_2.5.0_cuda90_release.7z %TMP_DIR_WIN%\\magma_2.5.0_cuda90_release.7z --quiet
+    aws s3 cp s3://ossci-windows/magma_2.5.0_cuda90_%BUILD_TYPE%.7z %TMP_DIR_WIN%\\magma_2.5.0_cuda90_%BUILD_TYPE%.7z --quiet
   )
-  7z x -aoa %TMP_DIR_WIN%\\magma_2.5.0_cuda90_release.7z -o%TMP_DIR_WIN%\\magma
+  7z x -aoa %TMP_DIR_WIN%\\magma_2.5.0_cuda90_%BUILD_TYPE%.7z -o%TMP_DIR_WIN%\\magma
 )
 set MAGMA_HOME=%TMP_DIR_WIN%\\magma
 
index 428932b..e9f7acd 100644 (file)
@@ -19,9 +19,11 @@ MKL and MAGMA. Here are the steps to build with them.
     7z x -aoa mkl_2018.2.185.7z -omkl
 
     REM Download MAGMA files
-    REM cuda100 is also available in the following line. There are also 2.4.0 binaries for cuda80/cuda92.
+    REM cuda100 is also available for `CUDA_PREFIX`. There are also 2.4.0 binaries for cuda80/cuda92.
+    REM The configuration could be `debug` or `release` for 2.5.0. Only `release` is available for 2.4.0.
     set CUDA_PREFIX=cuda90
-    curl -k https://s3.amazonaws.com/ossci-windows/magma_2.5.0_%CUDA_PREFIX%_release.7z -o magma.7z
+    set CONFIG=release
+    curl -k https://s3.amazonaws.com/ossci-windows/magma_2.5.0_%CUDA_PREFIX%_%CONFIG%.7z -o magma.7z
     7z x -aoa magma.7z -omagma
     
     REM Setting essential environment variables