sphericart icon indicating copy to clipboard operation
sphericart copied to clipboard

Building Sphericart-torch from source fails without specifying architecture and/or compiler (solution included)

Open amunozj opened this issue 6 months ago • 1 comments

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

amunozj avatar Aug 14 '24 13:08 amunozj