2.4K Star 8.2K Fork 4.4K

GVPMindSpore / mindspore

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
mindspore.hal.get_device_name.rst 603 Bytes
一键复制 编辑 原始数据 按行查看 历史
ZPaC 提交于 2024-01-18 09:20 . Add hal device doc

mindspore.hal.get_device_name

.. py:function:: mindspore.hal.get_device_name(device_id, device_target=None)

    返回指定卡号设备的设备名称。

    .. note::
        - 若用户不指定 `device_target` ,将此参数设置为当前已经设置的后端类型。
        - 对于CPU 后端,总是返回 ``"CPU"`` 。


    参数:
        - **device_id** (int) - 要查询的设备id。
        - **device_target** (str,可选) - 默认值:None,必须是 ``"CPU"`` , ``"GPU"`` 以及 ``"Ascend"`` 的其中一个。

    返回:
        str。
Python
1
https://gitee.com/mindspore/mindspore.git
git@gitee.com:mindspore/mindspore.git
mindspore
mindspore
mindspore
master

搜索帮助