num_gpus#

ivy.num_gpus()[source]#

Determine the number of available GPUs, with the backend framework.

Return type:

int

Returns:

ret – Number of available GPUs.

Examples

>>> print(ivy.num_gpus())
1