mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-31 23:27:43 +00:00
Add check for nullptr in PlannerImpl::FindReusableTensor(). (#3619)
This commit is contained in:
parent
0e12d05cd2
commit
2dd4f7e96b
1 changed files with 5 additions and 0 deletions
|
|
@ -330,6 +330,11 @@ class PlannerImpl {
|
|||
for (auto it = freelist_.begin(); it != freelist_.end(); ++it) {
|
||||
size_t reusable = static_cast<size_t>(it->ml_value);
|
||||
const onnxruntime::NodeArg* p_node_arg = ort_value_info_.at(reusable).p_def_site;
|
||||
if (!p_node_arg) {
|
||||
// TODO this should be an error case, needs more investigation
|
||||
// https://msdata.visualstudio.com/Vienna/_workitems/edit/724826/
|
||||
continue;
|
||||
}
|
||||
auto& available_memory_info = AllocPlan(p_node_arg->Name()).location;
|
||||
if (!(available_memory_info == required_memory_info)) continue;
|
||||
auto p_available_buffer_shape = context_.GetShape(*p_node_arg);
|
||||
|
|
|
|||
Loading…
Reference in a new issue