pytorch / pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration
https://pytorch.org
Other
81.95k stars 21.99k forks source link

I can't build for LibTorch on aarch64. Cannot find libcublas.so #71074

Closed MotorCityCobra closed 2 years ago

MotorCityCobra commented 2 years ago

🐛 Describe the bug

I'm trying to install LibTorch on a Jetson AGX Xavier.
I do a recursive git clone of this pytorch repo and run 'python3 tools/build_libtorch.py.
The build fails with the following error

FAILED: lib/libtorch_global_deps.so : && /usr/bin/cc -fPIC -fopenmp -DNDEBUG -O3 -DNDEBUG -DNDEBUG -Wl,--no-as-needed -rdynamic -shared -Wl,-soname,libtorch_global_deps.so -o lib/libtorch_global_deps.so caffe2/CMakeFiles/torch_global_deps.dir/__/torch/csrc/empty.c.o -Wl,-rpath,/usr/lib/aarch64-linux-gnu/openmpi/lib:/usr/local/cuda/lib64:::::::: /usr/lib/aarch64-linux-gnu/openmpi/lib/libmpi_cxx.so /usr/lib/aarch64-linux-gnu/openmpi/lib/libmpi.so /usr/local/cuda/lib64/libcurand.so /usr/local/cuda/lib64/libcufft.so -lCUDA_cublas_LIBRARY-NOTFOUND /usr/lib/aarch64-linux-gnu/libcudnn.so /usr/local/cuda/lib64/libcudart.so /usr/local/cuda/lib64/libnvToolsExt.so && : /usr/bin/ld: cannot find -lCUDA_cublas_LIBRARY-NOTFOUND collect2: error: ld returned 1 exit status [2357/3927] Building CXX object c10/test/CMakeFiles/c10_intrusive_ptr_test.dir/util/intrusive_ptr_test.cpp.o ninja: build stopped: subcommand failed.

Versions

JetPack 4.6 Nvidia Jetson AGX Xavier

jbschlosser commented 2 years ago

Hey @MotorCityCobra! It sounds like there may be a problem with your environment. I'd encourage you to post for help on the PyTorch forums, as you're more likely to receive assistance there. Note that these issues are for issues within PyTorch itself. Thanks!