!29693 unfied runtime adapt the env MS_DEV_ENABLE_CLOSURE

Merge pull request !29693 from limingqi107/new_actor_runtime
This commit is contained in:
i-robot 2022-02-07 03:28:44 +00:00 committed by Gitee
commit fb1396283a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 6 additions and 2 deletions

View File

@ -115,7 +115,9 @@ void DisableMindRT(const ResourcePtr &res) {
}
auto func_graph = res->func_graph();
MS_EXCEPTION_IF_NULL(func_graph);
if (func_graph != nullptr && func_graph->ContainMultiTarget() && IsDynamicShapeGraph(func_graph)) {
bool enable_old_runtime = (common::GetEnv("MS_DEV_ENABLE_CLOSURE") == "0");
if (enable_old_runtime ||
(func_graph != nullptr && func_graph->ContainMultiTarget() && IsDynamicShapeGraph(func_graph))) {
// Heterogeneous scenario + dynamic_shape runs in MsBackend.
MS_LOG(INFO) << "Disable mindRT in the heterogeneous + dynamic shape scenario.";
context_ptr->set_param<bool>(MS_CTX_ENABLE_MINDRT, false);

View File

@ -58,8 +58,9 @@ class BackwardNet(nn.Cell):
return grads
@pytest.mark.level1
@pytest.mark.level0
@pytest.mark.platform_x86_gpu_training
@pytest.mark.platform_x86_cpu
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
@ -76,6 +77,7 @@ def test_forward():
@pytest.mark.level0
@pytest.mark.platform_x86_gpu_training
@pytest.mark.platform_x86_cpu
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard