get_device_name¶
- paddle.device.cuda. get_device_name ( device=None ) [source]
-
Return the name of the device which is got from CUDA function cudaDeviceProp.
- Parameters
-
device (paddle.CUDAPlace|int, optional) – The device or the ID of the device. If device is None (default), the device is the current device.
- Returns
-
The name of the device.
- Return type
-
str
Examples
>>> >>> import paddle >>> paddle.device.set_device('gpu') >>> paddle.device.cuda.get_device_name() >>> paddle.device.cuda.get_device_name(0) >>> paddle.device.cuda.get_device_name(paddle.CUDAPlace(0))