Skip to content

Commit a37a2aa

Browse files
committed
Use intel Sparse on Windows
Use Sparse on Windows and updated mkl to 2021.4.0
1 parent 3e2d4a1 commit a37a2aa

File tree

8 files changed

+13
-15
lines changed

8 files changed

+13
-15
lines changed

conda/pytorch-nightly/bld.bat

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ if "%desired_cuda%" == "12.1" (
3434

3535
set DISTUTILS_USE_SDK=1
3636

37-
curl https://s3.amazonaws.com/ossci-windows/mkl_2020.2.254.7z -k -O
38-
7z x -aoa mkl_2020.2.254.7z -omkl
39-
set CMAKE_INCLUDE_PATH=%SRC_DIR%\mkl\include
40-
set LIB=%SRC_DIR%\mkl\lib;%LIB%
41-
4237
set libuv_ROOT=%PREFIX%\Library
4338
echo libuv_ROOT=%libuv_ROOT%
4439

conda/pytorch-nightly/meta.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ requirements:
1919
- python
2020
- setuptools
2121
- pyyaml
22+
- mkl-devel=2021.4.0 # [win]
2223
{% if cross_compile_arm64 == 0 %}
2324
- mkl-include # [x86_64]
2425
- mkl=2020.2 # [x86_64 and not win]
@@ -37,8 +38,9 @@ requirements:
3738

3839
run:
3940
- python
41+
- mkl==2021.4.0 # [win]
4042
{% if cross_compile_arm64 == 0 %}
41-
- mkl >=2018 # [x86_64]
43+
- mkl==2021.4 # [x86_64]
4244
{% endif %}
4345
- libuv # [win]
4446
- intel-openmp # [win]

conda/vs2019/conda_build_config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
blas_impl:
2-
- mkl # [x86_64]
31
c_compiler:
42
- vs2019 # [win]
53
cxx_compiler:

wheel/build_wheel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ fi
177177
if [[ "$(uname -m)" == "arm64" ]]; then
178178
retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq cmake ninja
179179
else
180-
retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq cmake ninja mkl-include==2022.2.1 mkl-static==2022.2.1 -c intel
180+
retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq cmake ninja mkl-include==2022.2.1 mkl-static==2022.2.1 mkl==2021.4.0 -c intel
181181
fi
182182
retry pip install -qr "${pytorch_rootdir}/requirements.txt" || true
183183

windows/build_pytorch.bat

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ exit /B 1
6767
:: Install MKL
6868
rmdir /s /q mkl
6969
del mkl_2020.2.254.7z
70-
curl https://s3.amazonaws.com/ossci-windows/mkl_2020.2.254.7z -k -O
71-
7z x -aoa mkl_2020.2.254.7z -omkl
72-
set CMAKE_INCLUDE_PATH=%cd%\mkl\include
73-
set LIB=%cd%\mkl\lib;%LIB%
7470

7571
:: Download MAGMA Files on CUDA builds
7672
set MAGMA_VERSION=2.5.4
@@ -128,7 +124,7 @@ for %%v in (%DESIRED_PYTHON_PREFIX%) do (
128124
) else (
129125
set "PATH=%CONDA_HOME%\envs\%%v;%CONDA_HOME%\envs\%%v\scripts;%CONDA_HOME%\envs\%%v\Library\bin;%ORIG_PATH%"
130126
)
131-
pip install ninja
127+
pip install ninja mkl-include==2021.4.0 mkl-devel==2021.4.0
132128
@setlocal
133129
:: Set Flags
134130
if not "%CUDA_VERSION%"=="cpu" (

windows/internal/copy.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ copy "%CUDA_PATH%\extras\CUPTI\lib64\cupti64_*.dll*" pytorch\torch\lib
1111

1212
copy "C:\Program Files\NVIDIA Corporation\NvToolsExt\bin\x64\nvToolsExt64_1.dll*" pytorch\torch\lib
1313
copy "%CONDA_LIB_PATH%\libiomp*5md.dll" pytorch\torch\lib
14+
copy "%CONDA_LIB_PATH%\mkl_intel_thread.1.dll" pytorch\torch\lib
15+
copy "%CONDA_LIB_PATH%\mkl_core.1.dll" pytorch\torch\lib
16+
1417
:: Should be set in build_pytorch.bat
1518
copy "%libuv_ROOT%\bin\uv.dll" pytorch\torch\lib
1619

windows/internal/copy_cpu.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
copy "%CONDA_LIB_PATH%\libiomp*5md.dll" pytorch\torch\lib
2+
copy "%CONDA_LIB_PATH%\mkl_intel_thread.1.dll" pytorch\torch\lib
3+
copy "%CONDA_LIB_PATH%\mkl_core.1.dll" pytorch\torch\lib
24
:: Should be set in build_pytorch.bat
35
copy "%libuv_ROOT%\bin\uv.dll" pytorch\torch\lib

windows/internal/smoke_test.bat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ if errorlevel 1 exit /b 1
5353

5454
set "PATH=%CD%\Python%PYTHON_VERSION%\Scripts;%CD%\Python;%PATH%"
5555

56-
pip install -q numpy protobuf "mkl>=2019"
56+
pip install -q numpy protobuf
5757
if errorlevel 1 exit /b 1
5858

5959
for /F "delims=" %%i in ('where /R "%PYTORCH_FINAL_PACKAGE_DIR:/=\%" *.whl') do pip install "%%i"
@@ -95,6 +95,8 @@ if errorlevel 1 exit /b 1
9595
:: todo: Remove numpy install once the issue above is resolved
9696
call conda install -yq numpy pytorch %CONDA_EXTRA_ARGS%
9797
if ERRORLEVEL 1 exit /b 1
98+
call conda install -yq mkl=2021.4.0
99+
if ERRORLEVEL 1 exit /b 1
98100

99101
set /a CUDA_VER=%CUDA_VERSION%
100102
set CUDA_VER_MAJOR=%CUDA_VERSION:~0,-1%

0 commit comments

Comments
 (0)