get_device_properties
- paddle.device.xpu. get_device_properties ( device: _XPUPlaceLike | None = None ) _gpuDeviceProperties [source]
-
Return the properties of given device.
- Parameters
-
device (paddle.XPUPlace|int|str|None, optional) – The device, the id of the device or the string name of device like ‘xpu: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('xpu') >>> paddle.device.xpu.get_device_properties() >>> # _gpuDeviceProperties(name='GPU', major=8, minor=6, total_memory=98304MB, multi_processor_count=8) >>> paddle.device.xpu.get_device_properties(0) >>> # _gpuDeviceProperties(name='GPU', major=8, minor=6, total_memory=98304MB, multi_processor_count=8) >>> paddle.device.xpu.get_device_properties('xpu:0') >>> # _gpuDeviceProperties(name='GPU', major=8, minor=6, total_memory=98304MB, multi_processor_count=8) >>> paddle.device.xpu.get_device_properties(paddle.XPUPlace(0)) >>> # _gpuDeviceProperties(name='GPU', major=8, minor=6, total_memory=98304MB, multi_processor_count=8)
