mindspore.hal.get_device_capability
- mindspore.hal.get_device_capability(device_id, device_target=None)[source]
Get specified device’s capability.
Note
If device_target is not specified, get the device capability of the current backend set by context.
- Parameters
- Returns
tuple(int, int) for GPU.
param1 - int, cuda major revision number.
param2 - int, cuda minor revision number.
None for Ascend and CPU.
Examples
>>> import mindspore as ms >>> device_target = ms.context.get_context("device_target") >>> print(ms.hal.get_device_capability(0, device_target))