Fix invalid device context

This commit is contained in:
gaoyong10 2021-07-11 15:56:55 +08:00
parent 975211be94
commit 6a8d62d04a
1 changed files with 2 additions and 0 deletions

View File

@ -928,8 +928,10 @@ void ControlNodeParser::FetchFrontValueNode(const std::vector<AnfNodePtr> &contr
MS_LOG(INFO) << "Cannot find backend parameter for front parameter:"
<< AnfAlgo::GetNodeDebugString(parameters[i - kCallInputStartPos])
<< ", used the default format";
CreateDeviceTensorForFrontParameter(inputs[i], device_contexts[0]);
front_value_nodes_.push_back({inputs[i], device_contexts[0]});
continue;
}
const auto &backend_node = front_to_backend_parameters_[parameters[i - kCallInputStartPos]].first;