forked from mindspore-Ecosystem/mindspore
fix get outputaddress error
This commit is contained in:
parent
4932854776
commit
6afd18a4d8
|
@ -1598,6 +1598,9 @@ void SessionBasic::UpdateOutputTensors(const VectorRef *outputs,
|
||||||
if (iter != tensor_to_node.end()) {
|
if (iter != tensor_to_node.end()) {
|
||||||
const auto &node = iter->second.first;
|
const auto &node = iter->second.first;
|
||||||
const auto &output_index = iter->second.second;
|
const auto &output_index = iter->second.second;
|
||||||
|
if (!AnfAlgo::OutputAddrExist(node, output_index)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const auto &address = AnfAlgo::GetMutableOutputAddr(node, output_index);
|
const auto &address = AnfAlgo::GetMutableOutputAddr(node, output_index);
|
||||||
tensor->set_device_address(address);
|
tensor->set_device_address(address);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue