as_ivy_dev#

ivy.as_ivy_dev(device, /)[source]#

Convert device to string representation.

Parameters:

device (Union[Device, str]) – The device handle to convert to string.

Return type:

Device

Returns:

ret – Device string e.g. ‘cuda:0’.

Examples

>>> y = ivy.as_ivy_dev('cpu')
>>> print(y)
cpu