diff options
author | rtarquini <tarquini@yahoo.com> | 2019-01-02 18:48:31 -0800 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2019-01-02 18:51:42 -0800 |
commit | 879bccb1afff1950659b779cc13ac8d6f0cf090d (patch) | |
tree | e140f5d23c4ff9a321ed7e970522c758859fa07f /cmake | |
parent | 62883a911c66fe7e57019afd44256f85b7b9eb41 (diff) | |
download | pytorch-879bccb1afff1950659b779cc13ac8d6f0cf090d.tar.gz pytorch-879bccb1afff1950659b779cc13ac8d6f0cf090d.tar.bz2 pytorch-879bccb1afff1950659b779cc13ac8d6f0cf090d.zip |
Support for Jetson Xavier (#15660)
Summary:
The request changes are to support building Pytorch 1.0 on the Jetson Xavier with Openblas. Jetson Xavier with Jetpack 3.3 has generic lapack installed. To pick up the CUDA accelerated BLAS/Lapack, I had to build Openblas and build/link pytorch from source. Otherwise, I got a runtime error indicating lapack routines were not cuda enabled.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15660
Differential Revision: D13571324
Pulled By: soumith
fbshipit-source-id: 9b148d081d6e7fa7e1824dfdd93283c67f69e683
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/FindBLAS.cmake | 4 | ||||
-rw-r--r-- | cmake/Modules/FindLAPACK.cmake | 4 | ||||
-rw-r--r-- | cmake/public/cuda.cmake | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/cmake/Modules/FindBLAS.cmake b/cmake/Modules/FindBLAS.cmake index 176aec1703..d6c0346739 100644 --- a/cmake/Modules/FindBLAS.cmake +++ b/cmake/Modules/FindBLAS.cmake @@ -62,12 +62,12 @@ MACRO(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list) if ( APPLE ) find_library(${_prefix}_${_library}_LIBRARY NAMES ${_library} - PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 + PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 /opt/OpenBLAS/lib /usr/lib/aarch64-linux-gnu ENV DYLD_LIBRARY_PATH ) else ( APPLE ) find_library(${_prefix}_${_library}_LIBRARY NAMES ${_library} - PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 + PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 /opt/OpenBLAS/lib /usr/lib/aarch64-linux-gnu ENV LD_LIBRARY_PATH ) endif( APPLE ) mark_as_advanced(${_prefix}_${_library}_LIBRARY) diff --git a/cmake/Modules/FindLAPACK.cmake b/cmake/Modules/FindLAPACK.cmake index 2886c2ae57..73161b6e26 100644 --- a/cmake/Modules/FindLAPACK.cmake +++ b/cmake/Modules/FindLAPACK.cmake @@ -50,12 +50,12 @@ macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas) if(APPLE) find_library(${_prefix}_${_library}_LIBRARY NAMES ${_library} - PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 + PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 /usr/lib/aarch64-linux-gnu ENV DYLD_LIBRARY_PATH) else(APPLE) find_library(${_prefix}_${_library}_LIBRARY NAMES ${_library} - PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 + PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 /usr/lib/aarch64-linux-gnu ENV LD_LIBRARY_PATH) endif(APPLE) endif(WIN32) diff --git a/cmake/public/cuda.cmake b/cmake/public/cuda.cmake index 849fa07524..6a8b41fd46 100644 --- a/cmake/public/cuda.cmake +++ b/cmake/public/cuda.cmake @@ -10,7 +10,7 @@ endif() list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/../Modules_CUDA_fix) # Find CUDA. -find_package(CUDA 7.0) +find_package(CUDA) if(NOT CUDA_FOUND) message(WARNING "Caffe2: CUDA cannot be found. Depending on whether you are building " |