mindspore.hal.get_device_name
- mindspore.hal.get_device_name(device_id, device_target=None)[source]
Get specified device’s name.
Note
If device_target is not specified, get the device name of the current backend set by context. This method always returns “CPU” for CPU backend.
- Parameters
- Returns
str.
Examples
>>> import mindspore as ms >>> device_target = ms.context.get_context("device_target") >>> print(ms.hal.get_device_name(0, device_target))