# tensorplay.cuda.get_device_name

Source: https://www.tensorplay.cn/docs/generated/tensorplay.cuda.get_device_name.html

# tensorplay.cuda.get_device_name

tensorplay.cuda.get_device_name(device: [Any](https://docs.python.org/3/library/typing.html#typing.Any) | [None](https://docs.python.org/3/library/constants.html#None) = None) &#x2192; [str](https://docs.python.org/3/library/stdtypes.html#str)[[source]](../_modules/tensorplay/cuda.html#get_device_name)

Get the name of a device.

Parameters:

device ([tensorplay.Device](tensorplay.Device.html#tensorplay.Device) or [int](https://docs.python.org/3/library/functions.html#int) or [str](https://docs.python.org/3/library/stdtypes.html#str), optional) – device for which to return the
name. This function is a no-op if this argument is a negative
integer. It uses the current device, given by [current_device()](tensorplay.cuda.current_device.html#tensorplay.cuda.current_device),
if [device](tensorplay.cuda.device.html#tensorplay.cuda.device) is None (default).

Returns:

the name of the device

Return type:

[str](https://docs.python.org/3/library/stdtypes.html#str)
