set abstract for maketuple

This commit is contained in:
yangwei 2021-03-18 19:14:28 +08:00
parent 93c21f99e2
commit e34b2873fa
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():