Skip to content

Commit

Permalink
Add Mkl on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
HGuillemet committed Jun 18, 2024
1 parent c0761cd commit 583277f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/actions/deploy-windows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ runs:
rm "C:/msys64/mingw32/bin/clang-cl.exe" "C:/msys64/mingw64/bin/clang-cl.exe" "C:/msys64/mingw32/bin/cmake.exe" "C:/msys64/mingw64/bin/cmake.exe"
rm "C:/Strawberry/c/lib/libz.a" "C:/Strawberry/c/lib/libzlib.a" "C:/Strawberry/c/lib/libzdll.a" "C:/Strawberry/c/bin/cmake.exe"
curl -LO https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-win64-x64.msi
msiexec /i cmake-3.26.4-win64-x64.msi /qn
rm cmake-3.26.4-win64-x64.msi
#curl -LO https://github.com/Kitware/CMake/releases/download/v3.30.0-rc3/cmake-3.30.0-rc3-win64-x64.msi
#msiexec /i cmake-3.30.0-rc3-win64-x64.msi /qn
#rm cmake-3.30.0-rc3-win64-x64.msi
curl -LO https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
bash -c "tar -xzf apache-maven-3.6.3-bin.tar.gz -C 'C:/Program Files/'"
Expand Down Expand Up @@ -159,7 +159,7 @@ runs:
move TensorRT-10.0.1.6 "%ProgramFiles%\NVIDIA GPU Computing Toolkit\TensorRT"
)
if "%CI_DEPLOY_MODULE%"=="mkl" (
if not "%CI_DEPLOY_NEED_MKL%"=="" (
echo Installing MKL
curl -LO https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b5a4ff98-2c98-4b28-87f7-32082cac359e/w_onemkl_p_2024.0.0.49672_offline.exe
w_onemkl_p_2024.0.0.49672_offline.exe -s -a -s --eula accept
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mkl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ env:
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
STAGING_REPOSITORY: ${{ secrets.STAGING_REPOSITORY }}
CI_DEPLOY_NEED_MKL: 1
jobs:
# linux-x86:
# runs-on: ubuntu-20.04
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pytorch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
env:
CI_DEPLOY_NEED_CACHE: 1
CI_DEPLOY_NEED_CUDA: 1
CI_DEPLOY_NEED_MKL: 1
CI_DEPLOY_MODULE: ${{ github.workflow }}
CI_DEPLOY_PLATFORM: ${{ github.job }}
CI_DEPLOY_SETTINGS: ${{ secrets.CI_DEPLOY_SETTINGS }}
Expand Down
8 changes: 8 additions & 0 deletions pytorch/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ fi
export PYTHON_BIN_PATH=$(which python3)
if [[ $PLATFORM == windows* ]]; then
export PYTHON_BIN_PATH=$(which python.exe)
export MKLProductDir="C:/Program Files (x86)/Intel/oneAPI"
fi

PYTORCH_VERSION=2.3.1
Expand Down Expand Up @@ -208,6 +209,13 @@ sedinplace 's/const std::string& interface)/const std::string\& interface_name)/
#USE_FBGEMM=0 USE_KINETO=0 USE_GLOO=0 USE_MKLDNN=0 \
"$PYTHON_BIN_PATH" setup.py build

pwd
ls
ls build

echo "CMAKECACHE"
cat build/CMakeCache.txt

rm -Rf ../lib
if [[ ! -e torch/include/gloo ]]; then
ln -sf ../../third_party/gloo/gloo torch/include
Expand Down

0 comments on commit 583277f

Please sign in to comment.