Skip to content

add support for setting sm count in nvcuda backend#384

Merged
benvanwerkhoven merged 5 commits into
masterfrom
tune_sm_counts
Jun 12, 2026
Merged

add support for setting sm count in nvcuda backend#384
benvanwerkhoven merged 5 commits into
masterfrom
tune_sm_counts

Conversation

@benvanwerkhoven

Copy link
Copy Markdown
Collaborator

Very experimental, but the idea is to be able to tune the active SM percentage in combination with other parameters. This can be controlled in CUDA using "Green Contexts". It is relatively involved to setup, so I have only implemented it in the cuda-python backend as of now.

The idea is that this parameter is interesting for energy efficiency tuning. In particular bandwidth bound kernels may disable some SMs to reduce energy use of cores that are idling most of the time anyway.

We could extend it to other CUDA backends as well probably.

@benvanwerkhoven

Copy link
Copy Markdown
Collaborator Author

This currently creates the green context after compiling the kernel. This is not necessary, and I would like to change this to right before benchmarking to be in line with how we handle special nvml parameters.

@benvanwerkhoven benvanwerkhoven marked this pull request as ready for review June 12, 2026 13:48
@sonarqubecloud

Copy link
Copy Markdown

@benvanwerkhoven benvanwerkhoven merged commit 09607cc into master Jun 12, 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