Skip to content

RFC: We could do with a DGGML_CUDA_ALL_VARIANTS? #3110

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

Closed
peardox opened this issue May 1, 2025 · 1 comment
Closed

RFC: We could do with a DGGML_CUDA_ALL_VARIANTS? #3110

peardox opened this issue May 1, 2025 · 1 comment

Comments

@peardox
Copy link

peardox commented May 1, 2025

DGGML_CPU_ALL_VARIANTS creates separate libraries for a load of different x86_64 variants to cater for newer capabilities

This of course r3ecognises that whisper.cpp will be used on, potentially, any old junk

The same is true for CUDA. The default action is to build for the build machine's GPU but in the same way that DGGML_CPU_ALL_VARIANTS allows for a variety of CPUs it would be desirable to build CUDA libraries covering all the bases.

If you manually specify the CUDA_ARCHITECTURE to be lots of variants (e.g. 50 - 120) you end up with a humungous library

It seems sensible to have a DGGML_CUDA_ALL_VARIANTS flag that writes libraries for the specific targets in the list - e.g.
-DCUDA_ARCHITECTURE="50;52;53;60;61;62;70;72;75;80;86;87;89;90;100;101;120" // Current list according to Wiki - pre-75 next on defunct list for newer CUDA

For exaample 120 is 50x0, 89 is 40x0, 86 is 30x0 etc

This would create lots of smaller libraries allowing a version of ggml_backend_score to be checked against the card's CUDA spec.

And smaller CUDA library = less required RAM (which never hurts)

The only thing that raises an issue I guess would be the extremely rare possibility of having multiple cards with multiple architectures (I chatted to a guy some years ago with exactly this setup)

Could also split CMAKE_CUDA_ARCHITECTURES I guess

@peardox
Copy link
Author

peardox commented May 3, 2025

Nahh, bad idea

@peardox peardox closed this as completed May 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant