File tree Expand file tree Collapse file tree 6 files changed +27
-9
lines changed Expand file tree Collapse file tree 6 files changed +27
-9
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,11 @@ echo "Failed to create conda env"
63
63
exit /B 1
64
64
:done
65
65
66
+
67
+ :: Install MKL
68
+ rmdir /s /q mkl
69
+ del mkl_2020.2.254.7z
70
+
66
71
:: Download MAGMA Files on CUDA builds
67
72
set MAGMA_VERSION = 2.5.4
68
73
@@ -117,7 +122,7 @@ for %%v in (%DESIRED_PYTHON_PREFIX%) do (
117
122
) else (
118
123
set " PATH = %CONDA_HOME% \envs\%%v ;%CONDA_HOME% \envs\%%v \scripts;%CONDA_HOME% \envs\%%v \Library\bin;%ORIG_PATH% "
119
124
)
120
- pip install ninja
125
+ pip install ninja mkl-include == 2021.4.0 mkl-devel == 2021.4.0
121
126
@ setlocal
122
127
:: Set Flags
123
128
if not " %CUDA_VERSION% " == " cpu" (
Original file line number Diff line number Diff line change @@ -9,11 +9,11 @@ FOR %%v IN (%DESIRED_PYTHON%) DO (
9
9
set PYTHON_VERSION_STR = %%v
10
10
set PYTHON_VERSION_STR = !PYTHON_VERSION_STR:. =!
11
11
conda remove -n py!PYTHON_VERSION_STR! --all -y || rmdir %CONDA_HOME% \envs\py!PYTHON_VERSION_STR! /s
12
- if " %%v " == " 3.8" call conda create -n py!PYTHON_VERSION_STR! -y -q numpy=1.11 intel:: mkl-static intel::mkl-include pyyaml boto3 cmake ninja typing_extensions python=%%v
13
- if " %%v " == " 3.9" call conda create -n py!PYTHON_VERSION_STR! -y -q numpy> =1.11 intel:: mkl-static intel::mkl-include pyyaml boto3 cmake ninja typing_extensions python=%%v
14
- if " %%v " == " 3.10" call conda create -n py!PYTHON_VERSION_STR! -y -q -c=conda-forge numpy=1.21.3 intel:: mkl-static intel::mkl-include pyyaml boto3 cmake ninja typing_extensions python=%%v
15
- if " %%v " == " 3.11" call conda create -n py!PYTHON_VERSION_STR! -y -q -c=conda-forge numpy=1.23.4 intel:: mkl-static intel::mkl-include pyyaml boto3 cmake ninja typing_extensions python=%%v
16
- if " %%v " == " 3.12" call conda create -n py!PYTHON_VERSION_STR! -y -q -c=conda-forge numpy=1.26.0 intel:: mkl-static intel::mkl-include pyyaml boto3 cmake ninja typing_extensions python=%%v
12
+ if " %%v " == " 3.8" call conda create -n py!PYTHON_VERSION_STR! -y -q numpy=1.11 " mkl=2020.2 " pyyaml boto3 cmake ninja typing_extensions python=%%v
13
+ if " %%v " == " 3.9" call conda create -n py!PYTHON_VERSION_STR! -y -q numpy> =1.11 " mkl=2020.2 " pyyaml boto3 cmake ninja typing_extensions python=%%v
14
+ if " %%v " == " 3.10" call conda create -n py!PYTHON_VERSION_STR! -y -q -c=conda-forge numpy=1.21.3 " mkl=2020.2 " intel-openmp=2023.2.0 pyyaml boto3 " cmake=3.19.6 " ninja typing_extensions python=%%v
15
+ if " %%v " == " 3.11" call conda create -n py!PYTHON_VERSION_STR! -y -q -c=conda-forge numpy=1.23.4 " mkl=2020.2 " intel-openmp=2023.2.0 pyyaml boto3 " cmake=3.19.6 " ninja typing_extensions python=%%v
16
+ if " %%v " == " 3.12" call conda create -n py!PYTHON_VERSION_STR! -y -q -c=conda-forge numpy=1.26.0 " mkl=2023.1 " intel-openmp=2023.2.0 pyyaml boto3 " cmake=3.19.6 " ninja typing_extensions python=%%v
17
17
)
18
18
endlocal
19
19
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ if %PYVER% LSS 35 (
65
65
echo Warning: PyTorch for Python 2 under Windows is experimental.
66
66
echo Python x64 3.5 or up is recommended to compile PyTorch on Windows
67
67
echo Maybe you can create a virual environment if you have conda installed:
68
- echo ^ > conda create -n test python=3.6 pyyaml numpy
68
+ echo ^ > conda create -n test python=3.6 pyyaml mkl numpy
69
69
echo ^ > activate test
70
70
)
71
71
Original file line number Diff line number Diff line change @@ -11,7 +11,10 @@ copy "%CUDA_PATH%\extras\CUPTI\lib64\cupti64_*.dll*" pytorch\torch\lib
11
11
12
12
copy " C:\Program Files\NVIDIA Corporation\NvToolsExt\bin\x64\nvToolsExt64_1.dll*" pytorch\torch\lib
13
13
copy " %CONDA_LIB_PATH% \libiomp*5md.dll" pytorch\torch\lib
14
-
14
+ IF " %PACKAGE_TYPE% " == " libtorch" (
15
+ copy " %CONDA_LIB_PATH% \mkl_intel_thread.1.dll" pytorch\torch\lib
16
+ copy " %CONDA_LIB_PATH% \mkl_core.1.dll" pytorch\torch\lib
17
+ )
15
18
:: Should be set in build_pytorch.bat
16
19
copy " %libuv_ROOT% \bin\uv.dll" pytorch\torch\lib
17
20
Original file line number Diff line number Diff line change 1
1
copy " %CONDA_LIB_PATH% \libiomp*5md.dll" pytorch\torch\lib
2
2
:: Should be set in build_pytorch.bat
3
- copy " %libuv_ROOT% \bin\uv.dll" pytorch\torch\lib
3
+ copy " %libuv_ROOT% \bin\uv.dll" pytorch\torch\lib
4
+
5
+ IF " %PACKAGE_TYPE% " == " libtorch" (
6
+ copy " %CONDA_LIB_PATH% \mkl_intel_thread.1.dll" pytorch\torch\lib
7
+ copy " %CONDA_LIB_PATH% \mkl_core.1.dll" pytorch\torch\lib
8
+ )
Original file line number Diff line number Diff line change @@ -70,6 +70,11 @@ echo "install and test libtorch"
70
70
pip install cmake
71
71
echo " installing cmake"
72
72
73
+ curl https://s3.amazonaws.com/ossci-windows/mkl_2020.2.254.7z -k -O
74
+ 7z x -aoa mkl_2020.2.254.7z -omkl
75
+ set LIB = %CD% \mkl\lib;%LIB%
76
+
77
+
73
78
if " %VC_YEAR% " == " 2019" powershell internal\vs2019_install.ps1
74
79
if " %VC_YEAR% " == " 2022" powershell internal\vs2022_install.ps1
75
80
You can’t perform that action at this time.
0 commit comments