get_device_capability¶
- paddle.device.cuda. get_device_capability ( device=None ) [source]
-
Return the major and minor revision numbers defining the device’s compute capability which are 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 major and minor revision numbers defining the device’s compute capability.
- Return type
-
tuple(int,int)
Examples
>>> >>> import paddle >>> paddle.device.set_device('gpu') >>> paddle.device.cuda.get_device_capability() >>> paddle.device.cuda.get_device_capability(0) >>> paddle.device.cuda.get_device_capability(paddle.CUDAPlace(0))