num_gpus

ivy.num_gpus(f: Optional[ivy.Framework] = None) → int[source]

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

Parameters

f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.

Returns

Number of available GPUs.


Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty