diff --git a/docs/mindspore/source_en/api_python/env_var_list.rst b/docs/mindspore/source_en/api_python/env_var_list.rst index d88ee1b49fc9af3e5317bb8f7ee3ae7b9420f49b..1fa4cd7ce89be8c7f6e0f627bc75e145b11eaf05 100644 --- a/docs/mindspore/source_en/api_python/env_var_list.rst +++ b/docs/mindspore/source_en/api_python/env_var_list.rst @@ -356,11 +356,13 @@ Graph Compilation and Execution - * - MS_DEV_DISABLE_AUTO_H2D - - Control whether the input of the operator performs implicit copying in PyNative mode. When enabled, implicit copying of operator input will be disabled. + - Control whether the Dispatch feature is enabled for operators in PyNative mode. When enabled, operators automatically selects the corresponding device for execution based on the device where the input Tensor is located. - Integer - - 1: Disable implicit copy of input for operators in PyNative mode. + - 1: Enable dispatch and disable implicit copying of operator inputs in PyNative mode. If the input Tensors are on different devices, an exception will be thrown. + - 2: Enable dispatch in PyNative mode. If the input Tensors are on different devices, the Python stack trace will be printed, and the operator will run on the higher-priority device (for example, if both Ascend and CPU Tensors exist, Ascend will be preferred). + - 3: Enable dispatch in PyNative mode. If the input Tensors are on different devices, the operator will run on the higher-priority device. - No setting or other value: Enable implicit copy of the operator input in PyNative mode. + Not set or any other value: Dispatch is disabled. - * - MS_DEV_LAUNCH_BLOCKING diff --git a/docs/mindspore/source_zh_cn/api_python/env_var_list.rst b/docs/mindspore/source_zh_cn/api_python/env_var_list.rst index 01b4557a4989da3b2f795c2e3391458b2c531be4..a49d1cb666859f5c5d62db540ff374d451778d8e 100644 --- a/docs/mindspore/source_zh_cn/api_python/env_var_list.rst +++ b/docs/mindspore/source_zh_cn/api_python/env_var_list.rst @@ -356,11 +356,13 @@ - * - MS_DEV_DISABLE_AUTO_H2D - - 控制动态图流程算子输入是否隐式拷贝。开启后,将关闭动态图算子输入隐式拷贝。 + - 控制在动态图流程中算子是否启用Dispatch功能。启用后,算子会根据输入``Tensor``所在的设备,自动选择对应的设备执行。 - Integer - - 1:关闭动态图算子输入隐式拷贝 + - 1:开启动态图Dispatch功能,关闭动态图算子输入隐式拷贝。如果输入多个``Tensor``的设备不一致,则会抛异常。 + - 2:开启动态图Dispatch功能。如果输入多个``Tensor``的设备不一致,则会打印堆栈信息,然后按高优先级的设备执行(例如:同时存在Ascend和CPU的Tensor,则优先到Ascend执行)。 + - 3:开启动态图Dispatch功能。如果输入多个``Tensor``的设备不一致,按高优先级的设备执行。 - 不设置或其他值:不关闭动态图算子输入隐式拷贝 + 不设置或其他值:不开启Dispatch功能 - * - MS_DEV_LAUNCH_BLOCKING