!68978 [MS][Infer][Task] add cn api docs

Merge pull request !68978 from 刘力力/code_docs_master_infer_api
This commit is contained in:
i-robot 2024-05-06 09:26:44 +00:00 committed by Gitee
commit 74f28ff1f5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 9 additions and 4 deletions

View File

@ -1,7 +1,7 @@
mindspore.JitConfig mindspore.JitConfig
==================== ====================
.. py:class:: mindspore.JitConfig(jit_level="", exc_mode="auto", jit_syntax_level="", debug_level="RELEASE", **kwargs) .. py:class:: mindspore.JitConfig(jit_level="", exc_mode="auto", jit_syntax_level="", debug_level="RELEASE", infer_boost="off", **kwargs)
编译时所使用的JitConfig配置项。 编译时所使用的JitConfig配置项。
@ -31,4 +31,9 @@ mindspore.JitConfig
- ``RELEASE`` : 正常场景下使用,一些调试信息会被丢弃以获取一个较好的编译性能。 - ``RELEASE`` : 正常场景下使用,一些调试信息会被丢弃以获取一个较好的编译性能。
- ``DEBUG`` : 当错误发生时,用来调试,在编译过程中,更多的调试信息会被记录下来。 - ``DEBUG`` : 当错误发生时,用来调试,在编译过程中,更多的调试信息会被记录下来。
- **infer_boost** (str, 可选): 使能推理加速模式。
只能设置为 ``"on"````"off"``。 默认设置为 "off",表示关闭推理加速。
当使能了推理加速模式MindSpore会优先使用高性能算子库并优化运行时提高推理性能。
注意:当前推理加速模式只能在 `jit_level` 设为 ``"O0"`` 时使用且仅支持Atlas A2系列产品。
- **kwargs** (dict) - 关键字参数字典。 - **kwargs** (dict) - 关键字参数字典。

View File

@ -60,10 +60,10 @@ class JitConfig:
infer_boost (str, optional): enable infer boost mode. infer_boost (str, optional): enable infer boost mode.
The value must be ``"on"`` , ``"off"``. Default to an "off", which means that disable infer boost. The value must be ``"on"`` , ``"off"``. Default to an "off", which means that disable infer boost.
when infer boost mode is enabled, mindspore will use high perf kernel lib, use faster runtime make when infer boost mode is enabled, MindSpore will use high perf kernel lib, use faster runtime make
infer speed is best. infer speed is best.
Note: current infer boost only support jit_level == O0 and device is Ascend910B Note: current infer boost only support `jit_level` == ``"O0"`` and only Atlas A2 series products
Default: ``"off"`` . are supported.
**kwargs (dict): A dictionary of keyword arguments that the class needs. **kwargs (dict): A dictionary of keyword arguments that the class needs.