dev_str

ivy.dev_str(x: ivy.NativeArray, f: Optional[ivy.Framework] = None) → str[source]

Get the device string for input array x.

Parameters
  • x (array) – Tensor for which to get the device string.

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

Returns

Device string for the array, e.g. ‘cuda:0’, ‘cuda:1’, ‘cpu’ etc..


Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty