Skip to content
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

Fix ggml-cuda using a driver symbol in NO_VMM mode #11188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

milot-mirdita
Copy link

I have integrated the ProstT5 protein language into Foldseek. Thanks a lot for the great library! I am upstreaming a few fixes for issues I found in ggml during the integration. I hope that it's okay to push the changes here and that they get synced at some point to the main ggml repo.

This fix should be simple. cuGetErrorString uses the driver API and should not be available if GGML_CUDA_NO_VMM is set.

@github-actions github-actions bot added Nvidia GPU Issues specific to Nvidia GPUs ggml changes relating to the ggml tensor library for machine learning labels Jan 11, 2025
@JohannesGaessler
Copy link
Collaborator

I don't follow your logic. How are these two things related?

@milot-mirdita
Copy link
Author

Would you prefer to rename GGML_CUDA_NO_VMM to GGML_CUDA_NO_DRIVER?

As far as I can tell GGML_CUDA_NO_VMM is used to disable the only subsystem that relies on the libcuda.so, everything else relies only on the cuda runtime.

@JohannesGaessler
Copy link
Collaborator

Can you explain the software and hardware setup where such an option would be beneficial?

@milot-mirdita
Copy link
Author

cudart exists as a static binary. The cuda driver exists only as a .so/.dll. Without the driver dependency I can build a (nearly) static binary that only depends on libc, that can be executed on e.g. a CPU-only system that doesn't have cuda installed. If I have to link against libcuda.so, the binary will not run on this system.

If you run ldd on the foldseek binary (https://mmseqs.com/foldseek/foldseek-linux-gpu.tar.gz), you will not see any cuda dependencies, despite it working fully with cuda.

@slaren
Copy link
Collaborator

slaren commented Jan 11, 2025

You can also avoid adding a hard dependency to CUDA by loading the backend dynamically. This wouldn't require disabling any features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ggml changes relating to the ggml tensor library for machine learning Nvidia GPU Issues specific to Nvidia GPUs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants