pytorch/cmake/Modules
Anders Papitto a853a74217 defer resolution of mkl to a cmake wrapper library (#11298)
Summary:
this is a fix that's needed for building extensions with a
pre-packaged pytorch. Consider the scenario where

(1) pytorch is compiled and packaged on machine A
(2) the package is downloaded and installed on machine B
(3) an extension is compiled on machine B, using the downloaded package

Before this patch, stage (1) would embed absolute paths to the system
installation of mkl into the generated Caffe2Config.cmake, leading to
failures in stage (3) if mkl was not at the same location on B as on
A. After this patch, only a reference to the wrapper library is
embedded, which is re-resolved on machine B.

We are already using a similar approach for cuda.

Testing: built a package on jenkins, downloaded locally and compiled an extension. Works with this patch, fails without.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/11298

Differential Revision: D9683150

Pulled By: anderspapitto

fbshipit-source-id: 06a80c3cd2966860ce04f76143b358de15f94aa4
2018-09-06 09:10:39 -07:00
..
FindARM.cmake [build] Setup to build ATen from root CMake file (#7163) 2018-05-02 19:33:31 -07:00
FindAtlas.cmake
FindBenchmark.cmake
FindBLAS.cmake [build] Setup to build ATen from root CMake file (#7163) 2018-05-02 19:33:31 -07:00
FindCUB.cmake
FindFFmpeg.cmake
FindGloo.cmake [c10d] NCCL Process Group implementation (#8182) 2018-06-08 10:33:27 -07:00
FindHiredis.cmake
FindLAPACK.cmake
FindLevelDB.cmake
FindLMDB.cmake
FindMAGMA.cmake [build] Setup to build ATen from root CMake file (#7163) 2018-05-02 19:33:31 -07:00
FindMatlabMex.cmake
FindMIOpen.cmake MIOpen integration, more tests enabled, bug fixes (#10612) 2018-08-23 15:24:47 -07:00
FindMKL.cmake defer resolution of mkl to a cmake wrapper library (#11298) 2018-09-06 09:10:39 -07:00
FindMKLDNN.cmake [build] Setup to build ATen from root CMake file (#7163) 2018-05-02 19:33:31 -07:00
FindNCCL.cmake [c10d] NCCL Process Group implementation (#8182) 2018-06-08 10:33:27 -07:00
FindNuma.cmake Add Numa support (#2152) 2018-03-05 23:30:20 -08:00
FindNumPy.cmake
FindOpenBLAS.cmake
Findpybind11.cmake
FindRocksDB.cmake
FindSnappy.cmake
FindSSE.cmake [build] Setup to build ATen from root CMake file (#7163) 2018-05-02 19:33:31 -07:00
FindvecLib.cmake
FindZMQ.cmake