get_device_name

paddle.device. get_device_name ( device: _CustomPlaceLike | None = None ) str [source]

Return the properties of given device.

Parameters

device (|paddle.CustomPlace|int|str|None, optional) – The device, the id of the device or the string name of device like npu:x’ which to get the properties of the device from. If device is None, the device is the current device. Default: None.

Returns

The name of the CUDA device.

Return type

str

Examples

>>> 
>>> import paddle
>>> name = paddle.device.get_device_name()
>>> print(name)