managpu

managpu: for choosing gpus


License
GPL-3.0
Install
pip install managpu==1.2.4

Documentation

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)