Skip to content

Commit

Permalink
Update mkl to 2020.2.254 (pytorch#52964)
Browse files Browse the repository at this point in the history
Summary:
Fixes pytorch#52907

Pull Request resolved: pytorch#52964

Reviewed By: H-Huang

Differential Revision: D26726464

Pulled By: seemethere

fbshipit-source-id: 8f3067292e6416e299b4b040c8fb73510134f02e
  • Loading branch information
peterjc123 authored and facebook-github-bot committed Mar 1, 2021
1 parent d4527b4 commit 8870c39
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
if "%REBUILD%"=="" (
if "%BUILD_ENVIRONMENT%"=="" (
curl --retry 3 -k https://s3.amazonaws.com/ossci-windows/mkl_2020.0.166.7z --output %TMP_DIR_WIN%\mkl.7z
curl --retry 3 -k https://s3.amazonaws.com/ossci-windows/mkl_2020.2.254.7z --output %TMP_DIR_WIN%\mkl.7z
) else (
aws s3 cp s3://ossci-windows/mkl_2020.0.166.7z %TMP_DIR_WIN%\mkl.7z --quiet
aws s3 cp s3://ossci-windows/mkl_2020.2.254.7z %TMP_DIR_WIN%\mkl.7z --quiet
)
7z x -aoa %TMP_DIR_WIN%\mkl.7z -o%TMP_DIR_WIN%\mkl
)
Expand Down
7 changes: 6 additions & 1 deletion caffe2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,12 @@ if(USE_OPENMP AND OPENMP_FOUND)
message(STATUS "pytorch is compiling with OpenMP. \n"
"OpenMP CXX_FLAGS: ${OpenMP_CXX_FLAGS}. \n"
"OpenMP libraries: ${OpenMP_CXX_LIBRARIES}.")
target_compile_options(torch_cpu PRIVATE ${OpenMP_CXX_FLAGS})
if(UNIX)
separate_arguments(OpenMP_CXX_OPTIONS UNIX_COMMAND "${OpenMP_CXX_FLAGS}")
else()
separate_arguments(OpenMP_CXX_OPTIONS WINDOWS_COMMAND "${OpenMP_CXX_FLAGS}")
endif()
target_compile_options(torch_cpu PRIVATE ${OpenMP_CXX_OPTIONS})
target_link_libraries(torch_cpu PRIVATE ${OpenMP_CXX_LIBRARIES})
endif()

Expand Down
3 changes: 2 additions & 1 deletion cmake/Modules/FindOpenMP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function(_OPENMP_FLAG_CANDIDATES LANG)
set(OMP_FLAG_Intel "-qopenmp")
endif()
set(OMP_FLAG_MIPSpro "-mp")
set(OMP_FLAG_MSVC "-openmp:experimental" "-openmp")
set(OMP_FLAG_MSVC "-openmp:experimental" "-openmp:experimental -I${__header_dir}" "-openmp" "-openmp -I${__header_dir}")
set(OMP_FLAG_PathScale "-openmp")
set(OMP_FLAG_NAG "-openmp")
set(OMP_FLAG_Absoft "-openmp")
Expand Down Expand Up @@ -132,6 +132,7 @@ set(OpenMP_C_CXX_TEST_SOURCE
int main(void) {
#ifdef _OPENMP
omp_get_max_threads();
omp_get_level();
return 0;
#else
breaks_on_purpose
Expand Down
4 changes: 2 additions & 2 deletions docs/source/notes/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ MKL and MAGMA. Here are the steps to build with them.
REM Make sure you have 7z and curl installed.
REM Download MKL files
curl https://s3.amazonaws.com/ossci-windows/mkl_2020.0.166.7z -k -O
7z x -aoa mkl_2020.0.166.7z -omkl
curl https://s3.amazonaws.com/ossci-windows/mkl_2020.2.254.7z -k -O
7z x -aoa mkl_2020.2.254.7z -omkl
REM Download MAGMA files
REM version available:
Expand Down

0 comments on commit 8870c39

Please sign in to comment.