mindspore/docs/api/api_python/hal/mindspore.hal.is_initialize...

19 lines
662 B
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.hal.is_initialized
=============================
.. py:function:: mindspore.hal.is_initialized(device_target)
返回目标设备是否已被初始化,此接口将在后续版本中废弃。
.. note::
CPU、GPU以及Ascend设备分别为在如下场景被初始化
- 分布式任务中,设备会在调用 `mindspore.communication.init` 后初始化。
- 单卡任务中,会在执行第一个算子或者调用创建流/事件接口后被初始化。
参数:
- **device_target** (str) - 目标设备,可选值为 ``"CPU"`` ``"GPU"`` 以及 ``"Ascend"``
返回:
bool