!13555 set abstract for maketuple

From: @youui
Reviewed-by: @kisnwang,@zhoufeng54
Signed-off-by: @zhoufeng54
This commit is contained in:
mindspore-ci-bot 2021-03-19 10:23:34 +08:00 committed by Gitee
commit 7607e92877
2 changed files with 3 additions and 0 deletions

View File

@ -1049,6 +1049,7 @@ std::vector<AnfNodePtr> SessionBasic::CreateCallSwitchLayerInputs(const CNodePtr
new_make_tuple_inputs.emplace_back(new_partial);
}
auto new_make_tuple = graph->NewCNode(new_make_tuple_inputs);
new_make_tuple->set_abstract(make_tuple_node->abstract());
switch_layer_inputs.emplace_back(new_make_tuple);
auto new_switch_layer = graph->NewCNode(switch_layer_inputs);
cnode_inputs.emplace_back(new_switch_layer);

View File

@ -38,6 +38,8 @@ class CaseNet(nn.Cell):
@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.platform_x86_gpu_training
@pytest.mark.env_onecard
def test_switch_layer():