@@ -4515,7 +4515,7 @@ void DavinciModel::UpdateOpIOAddrs(uint32_t task_id, uint32_t stream_id, const s | |||||
/// @return Status | /// @return Status | ||||
/// | /// | ||||
Status DavinciModel::GetTotalMemSizeExcludeZeroCopy(int64_t &total_useful_size) { | 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, | REPORT_CALL_ERROR("E19999", "total mem size[%lu] is less than zero copy size[%ld] ", runtime_param_.mem_size, | ||||
runtime_param_.zero_copy_size); | runtime_param_.zero_copy_size); | ||||
GELOGE(FAILED, "[Check][TotalMemSizeExcludeZeroCopy] failed, total mem size[%lu] is less than zero copy size[%ld]", | GELOGE(FAILED, "[Check][TotalMemSizeExcludeZeroCopy] failed, total mem size[%lu] is less than zero copy size[%ld]", | ||||
@@ -254,7 +254,7 @@ class DavinciModel { | |||||
/// @param [in] total_useful_size: total mem size - zero copy size. | /// @param [in] total_useful_size: total mem size - zero copy size. | ||||
/// @return Status | /// @return Status | ||||
/// | /// | ||||
status GetTotalMemSizeExcludeZeroCopy(int64_t &total_useful_size); | |||||
Status GetTotalMemSizeExcludeZeroCopy(int64_t &total_useful_size); | |||||
// model name | // model name | ||||
string Name() const { return name_; } | string Name() const { return name_; } | ||||
@@ -102,7 +102,7 @@ Status KnownNodeTask::Init(TaskContext &context) { | |||||
// allocate mem base | // allocate mem base | ||||
void *buffer = nullptr; | void *buffer = nullptr; | ||||
int64_t total_useful_size = 0; | 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."); | "[Get][TotalMemSizeExcludeZeroCopy] failed."); | ||||
if (total_useful_size != 0) { | if (total_useful_size != 0) { | ||||
RECORD_EXECUTION_EVENT(context.GetExecutionContext(), context.GetNodeName(), | RECORD_EXECUTION_EVENT(context.GetExecutionContext(), context.GetNodeName(), | ||||