mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-08 00:23:03 +00:00
Fix build errors when building with enable_memory_profile (#11617)
This commit is contained in:
parent
6e65bac5c2
commit
d03d7afef8
2 changed files with 2 additions and 2 deletions
|
|
@ -886,7 +886,7 @@ class PlannerImpl {
|
|||
#if !defined(ORT_MINIMAL_BUILD) && defined(ORT_MEMORY_PROFILE)
|
||||
size_t max_pc = plan_.execution_plan.size();
|
||||
std::string node_arg_name;
|
||||
ort_value_name_idx_map_.GetName(static_cast<int>(i), node_arg_name);
|
||||
ORT_RETURN_IF_ERROR(ort_value_name_idx_map_.GetName(static_cast<int>(i), node_arg_name));
|
||||
auto node_arg = graph_viewer_.GetNodeArg(node_arg_name);
|
||||
plan_.allocation_plan[i].value_type = utils::GetMLDataType(*node_arg);
|
||||
plan_.allocation_plan[i].life_interval = std::pair<size_t, size_t>(0, max_pc);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ void MemoryInfo::GenerateTensorMap(const SequentialExecutionPlan* execution_plan
|
|||
continue;
|
||||
AllocInfoPerTensor mem_info;
|
||||
mem_info.mlvalue_index = value_idx;
|
||||
value_name_idx_map.GetName(mem_info.mlvalue_index, mem_info.mlvalue_name);
|
||||
ORT_THROW_IF_ERROR(value_name_idx_map.GetName(mem_info.mlvalue_index, mem_info.mlvalue_name));
|
||||
mem_info.lifetime_interval = execution_plan->allocation_plan[value_idx].life_interval;
|
||||
mem_info.reused_buffer = (execution_plan->allocation_plan[value_idx].alloc_kind != AllocKind::kReuse) ? value_idx : execution_plan->allocation_plan[value_idx].reused_buffer;
|
||||
//If the tensor is using memory outside of the scope, do not store it
|
||||
|
|
|
|||
Loading…
Reference in a new issue