get_device_properties¶
- paddle.device.cuda. get_device_properties ( device=None ) [source]
-
Return the properties of given device.
- Parameters
-
device (paddle.CUDAPlace or int or str, optional) – The device, the id of the device or the string name of device like ‘gpu:x’ which to get the properties of the device from. If device is None, the device is the current device. Default: None.
- Returns
-
The properties of the device which include ASCII string identifying device, major compute capability, minor compute capability, global memory available and the number of multiprocessors on the device.
- Return type
-
_gpuDeviceProperties
Examples
>>> >>> import paddle >>> paddle.device.set_device('gpu') >>> paddle.device.cuda.get_device_properties() >>> # _gpuDeviceProperties(name='A100-SXM4-40GB', major=8, minor=0, total_memory=40536MB, multi_processor_count=108) >>> paddle.device.cuda.get_device_properties(0) >>> # _gpuDeviceProperties(name='A100-SXM4-40GB', major=8, minor=0, total_memory=40536MB, multi_processor_count=108) >>> paddle.device.cuda.get_device_properties('gpu:0') >>> # _gpuDeviceProperties(name='A100-SXM4-40GB', major=8, minor=0, total_memory=40536MB, multi_processor_count=108) >>> paddle.device.cuda.get_device_properties(paddle.CUDAPlace(0)) >>> # _gpuDeviceProperties(name='A100-SXM4-40GB', major=8, minor=0, total_memory=40536MB, multi_processor_count=108)