Skip to main content

A simple tool to select the optimal CUDA device based on memory, power, or utilization.

Project description

Auto Cuda Selector

A simple tool to select the optimal CUDA device based on memory, power, or utilization.

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cuda_selector-0.1.4.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cuda_selector-0.1.4-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file cuda_selector-0.1.4.tar.gz.

File metadata

  • Download URL: cuda_selector-0.1.4.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for cuda_selector-0.1.4.tar.gz
Algorithm Hash digest
SHA256 baac0d4bbb8da722340c6e0352ad96236333c5e7f08666c8afa97b5a1330e092
MD5 b6ddd30962ea806c63dea6ccb45c0e0d
BLAKE2b-256 49d75b9f10ad5b865dfd7b0f24b20da2f61060e1b97fe63a88fd3de2905ae2b7

See more details on using hashes here.

File details

Details for the file cuda_selector-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: cuda_selector-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for cuda_selector-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7f11f451cdb0c6b559d284033d64376da08ccdb57555d46279a345c14b6dff7a
MD5 7d498c3b672a647ff74f6d3a61dd6e63
BLAKE2b-256 31aac089367a5c697e390f0715701902aaf097eb61a2f7ef2915f1e5a54672d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page