Auto Cuda Selector
A simple tool to select the optimal CUDA device based on memory, power, temperature, or utilization. It supports fallback to CPU and custom sorting functions. Supports CUDA devices on Linux and MPS devices on macOS. Full documentation be found here
Install
pip install cuda-selector
Usage
from cuda_selector import auto_cuda
# Select the CUDA device with the most memory available
device = auto_cuda()
# Select the CUDA device with the lowest power usage
device = auto_cuda('power')
# Select the CUDA device with the lowest GPU utilization
device = auto_cuda('utilization')
# Select the CUDA device with the lowest temperature
device = auto_cuda('temperature')
# Select multiple devices with the most free memory
devices = auto_cuda(n=3)
# Exclude specific devices by their index
devices = auto_cuda(exclude=[0, 1])
# Apply thresholds for power usage and utilization
devices = auto_cuda(thresholds={'power': 150, 'utilization': 70})
# Use a custom ranking function for selecting devices
devices = auto_cuda(sort_fn=lambda d: d['memory_free'] * 0.7 + d['utilization'] * 0.3)
Metadata
Release files for cuda-selector 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cuda_selector-0.1.5.tar.gz | 4.6 kB | Without provenance | Details for cuda_selector-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cuda_selector-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for cuda_selector-0.1.5-py3-none-any.whl |
Total release size: 8.8 kB
Release files / cuda_selector-0.1.5.tar.gz
| Download URL | cuda_selector-0.1.5.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d4d37c6109ac4596016873c763eef6a033d168eea7d9a2d69453e87a9e0b8e1
|
|
BLAKE2b-256 checksum How to use checksums |
2a488e71ef362a7cac95b7b7c353bc4ff3280df312fb6b306125b4524fc1f1f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.10
|
Release files / cuda_selector-0.1.5-py3-none-any.whl
| Download URL | cuda_selector-0.1.5-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf477d8967cd0fb558750b6e97dcb280d1fff824edcaf2d415f8bf24bcee2050
|
|
BLAKE2b-256 checksum How to use checksums |
b7c55824359a268524dd9090e6972f230fbb86f85c22dd78bba523e931a83000
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.10
|
Security for cuda-selector 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.