Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
/ setGPU Public

Small Python library to automatically set CUDA_VISIBLE_DEVICES to the least loaded device on multi-GPU systems.

Notifications You must be signed in to change notification settings

bamos/setGPU

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

setGPU

A small Python library that automatically sets CUDA_VISIBLE_DEVICES to the least-loaded GPU on multi-GPU systems and can be used by:

  1. Putting import setGPU before any import that will use a GPU like Torch, TensorFlow, or JAX.
  2. Defining an alias such as alias setGPU='eval $(python3 -m setGPU)' and calling that to set the GPU in the shell before running another program that uses the GPU.

Installation

pip install git+https://github.com/bamos/setGPU.git

Dependencies

Licensing

This code is in the public domain.

About

Small Python library to automatically set CUDA_VISIBLE_DEVICES to the least loaded device on multi-GPU systems.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages