/cuda-gpu-helper

A Python module helping determing GPU device information, useful for PyTorch users who share machine with others.

Primary LanguagePython

CUDA Device Information Parser

A Python module helping determing GPU device information, for PyTorch users who share machine with others.

Prerequisites

  • PyTorch
  • NumPy
  • The NVIDIA System Management Interface

Usage

The object will keep the list of devices that meet the requirements specified at initialization.

  • Use device_list to get the numbers of devices selected
  • Use data_loc() to get the location the data should be stored, especially if using DataParallel
  • Use string_gpu_memory() to print the current status of GPUs selected.

TODO

  • Use nvidia-smi interface instead of parsing the output