Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build issue. CUDA may be installed in $CUDA_HOME/lib on macOS. #23491

Closed
wants to merge 1 commit into from

Conversation

rgommers
Copy link
Collaborator

Closes gh-16955.
Closes pytorch/vision#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.

@pytorchbot pytorchbot added the module: cpp-extensions Related to torch.utils.cpp_extension label Jul 28, 2019
Closes pytorchgh-16955.
Closes pytorch/vision#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.
@rgommers
Copy link
Collaborator Author

weird CI failures, maybe due to force push.

@rgommers rgommers reopened this Jul 28, 2019
@rgommers
Copy link
Collaborator Author

okay unrelated to this PR, happening on other PRs as well - some issues with apt repos

+ grep '[a]pt'
_apt      2112  0.0  0.0  42004  5408 ?        S    21:10   0:00 /usr/lib/apt/methods/http
Exited with code 1

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soumith is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@soumith merged this pull request in 81e46d4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merged module: cpp-extensions Related to torch.utils.cpp_extension open source
Projects
None yet
6 participants