Skip to content

Default cuda backend selection#385

Merged
benvanwerkhoven merged 4 commits into
masterfrom
default_cuda_backend_selection
Jun 17, 2026
Merged

Default cuda backend selection#385
benvanwerkhoven merged 4 commits into
masterfrom
default_cuda_backend_selection

Conversation

@benvanwerkhoven

Copy link
Copy Markdown
Collaborator

This replaces PyCUDA with cuda-python as the default backend.

The default selection scheme is slightly more sophisticated now. cuda-python is only selected when it is installed. If you only have pycuda installed, pycuda will still be the default backend.

Specifically, if lang= option does not explicitly select a CUDA backend, meaning it is "CUDA" and not any of "PYCUDA", "CUPY", or "NVCUDA", the selection order for a CUDA backend now is:

  1. cuda-python (if installed)
  2. cupy (if installed)
  3. pycuda (if installed)
  4. throw exception to tell user to install a CUDA backend

@benvanwerkhoven benvanwerkhoven marked this pull request as ready for review June 12, 2026 11:19
@benvanwerkhoven benvanwerkhoven requested a review from stijnh June 12, 2026 11:19
@sonarqubecloud

Copy link
Copy Markdown

@benvanwerkhoven

Copy link
Copy Markdown
Collaborator Author

Tested on Google Colab and it now works out of the box without using the lang="cupy" or any other lang= option.

@benvanwerkhoven benvanwerkhoven merged commit 5f0c61f into master Jun 17, 2026
4 checks passed
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

Successfully merging this pull request may close these issues.

1 participant