pytorch
81e46d4f - Fix build issue. CUDA may be installed in `$CUDA_HOME/lib` on macOS. (#23491)

Comment changes are shownComment changes are hidden
Commit
5 years ago
Fix build issue. CUDA may be installed in `$CUDA_HOME/lib` on macOS. (#23491) Summary: Closes gh-16955. Closes https://github.com/pytorch/vision/issues/977 On Linux both `lib64` and `lib` may be present (symlinked). The reports seem to all be about macOS, but it seems like this is also possibly more robust on Linux and can't hurt. So not treating platforms differently. Note that Eigen has a similar check in its CMake: ``` if(CUDA_64_BIT_DEVICE_CODE AND (EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/lib64")) link_directories("${CUDA_TOOLKIT_ROOT_DIR}/lib64") else() link_directories("${CUDA_TOOLKIT_ROOT_DIR}/lib") endif() ``` There may be other issues for building from source on macOS, can't test. Pull Request resolved: https://github.com/pytorch/pytorch/pull/23491 Differential Revision: D16538973 Pulled By: soumith fbshipit-source-id: cc309347b7d16e718e06878d3824d0a6e40b1019
Author
Parents
  • torch/utils
    • File
      cpp_extension.py