mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 04:53:27 +00:00
746f6ce73f
PyTorch failed to build with the BLAS implementation set to MKL, because CMake install tried to set an rpath that is incorrect for Nix. This change simply removes the offending code to make the build succeed and get correct rpaths.
18 lines
642 B
Diff
18 lines
642 B
Diff
diff --git a/cmake/public/mkl.cmake b/cmake/public/mkl.cmake
|
|
index 2f6d1fd905..f30464be07 100644
|
|
--- a/cmake/public/mkl.cmake
|
|
+++ b/cmake/public/mkl.cmake
|
|
@@ -16,12 +16,6 @@ foreach(MKL_LIB IN LISTS MKL_LIBRARIES)
|
|
endif()
|
|
endforeach()
|
|
|
|
-# TODO: This is a hack, it will not pick up architecture dependent
|
|
-# MKL libraries correctly; see https://github.com/pytorch/pytorch/issues/73008
|
|
-set_property(
|
|
- TARGET caffe2::mkl PROPERTY INTERFACE_LINK_DIRECTORIES
|
|
- ${MKL_ROOT}/lib ${MKL_ROOT}/lib/intel64 ${MKL_ROOT}/lib/intel64_win ${MKL_ROOT}/lib/win-x64)
|
|
-
|
|
if(UNIX)
|
|
if(USE_STATIC_MKL)
|
|
foreach(MKL_LIB_PATH IN LISTS MKL_LIBRARIES)
|