sphericart
sphericart copied to clipboard
Building Sphericart-torch from source fails without specifying architecture and/or compiler (solution included)
Hello friends! I have been trying to install sphericart-torch from source into a conda environment so that I can use the GPU, but had a very hard time. I kept getting errors like this:
CMake Error at /tmp/pip-build-env-h_izynb9/overlay/lib/python3.12/site-packages/cmake/data/share/cmake-3.30/Modules/Internal/CMakeCUDAArchitecturesValidate.cmake:7 (message): CMAKE_CUDA_ARCHITECTURES must be non-empty if set.
In the end I solved adding this two lines to: 'sphericart-torch/ CMakeLists.txt'
set(CMAKE_CUDA_ARCHITECTURES "native") set(CMAKE_CUDA_COMPILER /usr/local/cuda-12.4/bin/nvcc)
I'm posting this here, in case somebody else has this issue. Once you add these lines, you'll have to delete the build
folders inside the root of the repository and the sphericart-torch
folder