forked from mindspore-Ecosystem/mindspore
Fix invalid device context
This commit is contained in:
parent
975211be94
commit
6a8d62d04a
|
@ -928,8 +928,10 @@ void ControlNodeParser::FetchFrontValueNode(const std::vector<AnfNodePtr> &contr
|
||||||
MS_LOG(INFO) << "Cannot find backend parameter for front parameter:"
|
MS_LOG(INFO) << "Cannot find backend parameter for front parameter:"
|
||||||
<< AnfAlgo::GetNodeDebugString(parameters[i - kCallInputStartPos])
|
<< AnfAlgo::GetNodeDebugString(parameters[i - kCallInputStartPos])
|
||||||
<< ", used the default format";
|
<< ", used the default format";
|
||||||
|
|
||||||
CreateDeviceTensorForFrontParameter(inputs[i], device_contexts[0]);
|
CreateDeviceTensorForFrontParameter(inputs[i], device_contexts[0]);
|
||||||
front_value_nodes_.push_back({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;
|
const auto &backend_node = front_to_backend_parameters_[parameters[i - kCallInputStartPos]].first;
|
||||||
|
|
Loading…
Reference in New Issue