get_gpu_device_count
Return the number of available GPU devices.
Note
- The returned value is
0
if the installed or compiled package does not support training on GPU. - Use the
CUDA_VISIBLE_DEVICES
environment variable to limit the list of available devices.
Method call format
get_gpu_device_count()
Usage examples
from catboost.utils import get_gpu_device_count
print('I see %i GPU devices' % get_gpu_device_count())