-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building Sphericart-torch from source fails without specifying architecture and/or compiler (solution included) #133
Comments
Thanks @amunozj! |
@frostedoyster looking in more detail I found someone reporting that this error is a CMAKE red herring, and the actual problem is no setting the CMAKE_CUDA_COMPILER . |
Thanks a lot for the report and also for the solution! You're right that it's most likely not a CUDA architecture issue. Let's wait for @nickjbrowning's opinion on this and then we'll see if we can add something in the installation scripts and/or in the documentation |
Hi @frostedoyster and @nickjbrowning I have been installing it in more machines and I can confirm that the actual problem, and solution is pointing at the system cuda compiler properly. My struggle (and what I suppose will be a problem for others) is that I'm installing sphericart inside a conda environment that natively has an incomplete cuda installation. This makes pip try to find the compiler and libraries inside the conda environment, not find them, and crash. The solution is adding the path to the actual compiler of your system in all the Now, since we are chatting, let me also thank you for sphericart. I looked, and looked, and looked, and looked, and could not find anything like it so thank you from the bottom of my heart because it works really well and addresses a huge need I had. Also, I was wondering, why don't you provide the Torch build for CUDA as part of PyPI? The challenge I faced is that the PyPI package doesn't have CUDA support and I want to use sphericart to define Kolmogorov-Arnold layers, which need to train on the GPU. If you provide the CUDA sphericart directly on PyPI, only super-users will have to build it manually. Please keep up the great job and thank you for your service to the community! |
Sorry about my lack of response on this issue - I've been on holiday. The way to build CUDA-enabled sphericart is downloading and installing the CUDA SDK separately and setting your Regarding providing the packaging on PyPi - we are actually working on runtime compilation of sphericart-cuda through NVRTC. Once this is complete we should be able to provide a CPU-only package on PyPi, which will build and link the sphericart-cuda libraries dynamically if CUDA_HOME has been set - this should hide away some of the packaging/installation. perhaps the best solution is to update the docs @frostedoyster @Luthaf to make sure users install the SDK prior to trying to build CUDA-sphericart? I'm not sure yet how this will change when we swap over to runtime compilation... |
Ok! Added to the documentation on installation in #143 |
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 thesphericart-torch
folderThe text was updated successfully, but these errors were encountered: