Browse Source

Zero copy nodes are not allocated memory in the known subgraph

pull/1707/head
wqtshg 4 years ago
parent
commit
5d012c05b7
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      ge/graph/load/model_manager/davinci_model.cc
  2. +1
    -1
      ge/graph/load/model_manager/davinci_model.h
  3. +1
    -1
      ge/hybrid/node_executor/compiledsubgraph/known_node_executor.cc

+ 1
- 1
ge/graph/load/model_manager/davinci_model.cc View File

@@ -4515,7 +4515,7 @@ void DavinciModel::UpdateOpIOAddrs(uint32_t task_id, uint32_t stream_id, const s
/// @return Status
///
Status DavinciModel::GetTotalMemSizeExcludeZeroCopy(int64_t &total_useful_size) {
if (runtime_param_.mem_size < runtime_param_.zero_copy_size) {
if (runtime_param_.mem_size < static_cast<uint64_t>(runtime_param_.zero_copy_size)) {
REPORT_CALL_ERROR("E19999", "total mem size[%lu] is less than zero copy size[%ld] ", runtime_param_.mem_size,
runtime_param_.zero_copy_size);
GELOGE(FAILED, "[Check][TotalMemSizeExcludeZeroCopy] failed, total mem size[%lu] is less than zero copy size[%ld]",


+ 1
- 1
ge/graph/load/model_manager/davinci_model.h View File

@@ -254,7 +254,7 @@ class DavinciModel {
/// @param [in] total_useful_size: total mem size - zero copy size.
/// @return Status
///
status GetTotalMemSizeExcludeZeroCopy(int64_t &total_useful_size);
Status GetTotalMemSizeExcludeZeroCopy(int64_t &total_useful_size);

// model name
string Name() const { return name_; }


+ 1
- 1
ge/hybrid/node_executor/compiledsubgraph/known_node_executor.cc View File

@@ -102,7 +102,7 @@ Status KnownNodeTask::Init(TaskContext &context) {
// allocate mem base
void *buffer = nullptr;
int64_t total_useful_size = 0;
GE_CHK_STATUS_RET(davinci_model_.GetTotalMemSizeExcludeZeroCopy(total_useful_size),
GE_CHK_STATUS_RET(davinci_model_->GetTotalMemSizeExcludeZeroCopy(total_useful_size),
"[Get][TotalMemSizeExcludeZeroCopy] failed.");
if (total_useful_size != 0) {
RECORD_EXECUTION_EVENT(context.GetExecutionContext(), context.GetNodeName(),


Loading…
Cancel
Save