deviceIDs - list of all available GPU device ids.excludeUUID - Same as excludeID except it uses the UUID.excludeID - List of IDs, which should be excluded from the list of available GPUs.includeNan - True/false flag indicating whether to include GPUs where either load or memory usage is NaN (indicating usage could not be retrieved).GPUs with a current memory usage larger than maxMemory is not returned. maxMemory - Maximum current relative memory usage for a GPU to be considered available.GPUs with a load larger than maxLoad is not returned. maxLoad - Maximum current relative load for a GPU to be considered available.limit - limits the number of GPU device ids returned to the specified number.'memory' - orders the available GPU device ids by ascending memory usage.'load'- orders the available GPU device ids by ascending load.'random' - orders the available GPU device ids randomly.'last' - orders available GPU device ids by descending id.'first' - orders available GPU device ids by ascending id ( defaut).order should be specified as one of the following strings: order - Deterimines the order in which the available GPU device ids are returned.The order, maximum number of devices, their maximum load and maximum memory consumption are determined by the input arguments. Availablity is determined based on current memory usage and load. getAvailable( order = 'first', limit = 1, maxLoad = 0.5, maxMemory = 0.5, includeNan = False, excludeID =, excludeUUID =) In the newly opened python console, type:ĭeviceIDs = GPUtil.Start a python console by typing python in the terminal.Open a terminal in a folder other than the GPUtil folder.Tested on CUDA driver version 390.77 Python 2.7 and 3.5. platform ( The Python Standard Library).distutils ( The Python Standard Library).subprocess ( The Python Standard Library).nvidia-smi should be installed automatically, when you install your NVIDIA driver. GPUtil uses the program nvidia-smi to get the GPU status of all available NVIDIA GPUs. NVIDIA GPU with latest NVIDIA driver installed. The module is written with GPU selection for Deep Learning in mind, but it is not task/library specific and it can be applied to any task, where it may be useful to identify available GPUs. GPUtil locates all GPUs on the computer, determines their availablity and returns a ordered list of available GPUs.Īvailablity is based upon the current memory consumption and load of each GPU. GPUtil is a Python module for getting the GPU status from NVIDA GPUs using nvidia-smi.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |