Skip to content
/ managpu Public

Aim to minimize operation when using gpus for AI

License

Notifications You must be signed in to change notification settings

iyupan/managpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pypi Version License

managpu

It is used to choose gpu to run for AI.

How to install it?

  • Setup by hand:
python setup.py build
python setup.py install
  • Setup by pip:
pip install managpu

How to choose gpus?

  • Import the package:
from managpu import GpuManager
  • Create an entry:
my_gpu = GpuManager(visible_gpus)
  • Then choose gpus:

    • Choose in terms of free memory:

      res = my_gpu.set_by_memory(top_k, limited_gpu_util)
    • Choose specific gpus:

      res = my_gpu.set_specified_gpu(gpus)

About

Aim to minimize operation when using gpus for AI

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages