-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cmake): building dynamic library for specified GPU architectures …
…and support multi threads compile (#164) Added a CMake variable `USER_CUDA_ARCH_LIST` to allow users to specify CUDA architectures manually. If this variable is not set, CMake will automatically detect the CUDA architecture of the underlying machine and build the dynamic library accordingly. Set the `TORCH_CUDA_ARCH_LIST` environment variable to the desired architecture. CMake will automatically read this value from the environment. for example: dynamic library is built for sm_75 and sm_80: ```bash export TORCH_CUDA_ARCH_LIST="7.5 8.0" python3 setup.py develop 2>&1 | tee build.log ``` dynamic library is built for local GPU: ```bash python3 setup.py develop 2>&1 | tee build.log ```
- Loading branch information
Showing
2 changed files
with
52 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters