Browse Source

Fix code check

tags/v1.2.0
dongduo 3 years ago
parent
commit
3a8999a78a
3 changed files with 4 additions and 4 deletions
  1. +1
    -1
      ge/common/helper/model_helper.cc
  2. +1
    -1
      ge/graph/load/new_model_manager/davinci_model.cc
  3. +2
    -2
      ge/graph/load/new_model_manager/model_manager.cc

+ 1
- 1
ge/common/helper/model_helper.cc View File

@@ -124,7 +124,7 @@ Status ModelHelper::SaveModelTbeKernel(std::shared_ptr<OmFileSaveHelper> &om_fil
ModelPartitionType::TBE_KERNELS, ModelPartitionType::TBE_KERNELS,
ge_model->GetTBEKernelStore().Data(), ge_model->GetTBEKernelStore().Data(),
ge_model->GetTBEKernelStore().DataSize(), model_index), ge_model->GetTBEKernelStore().DataSize(), model_index),
"Add tbe kernel partition failed");
"Add tbe kernel partition failed");
} }
// no need to check value, DATA->NetOutput // no need to check value, DATA->NetOutput
(void)tbe_kernel_store.Load(tbe_kernel_store.Data(), tbe_kernel_store.DataSize()); (void)tbe_kernel_store.Load(tbe_kernel_store.Data(), tbe_kernel_store.DataSize());


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

@@ -2676,7 +2676,7 @@ Status DavinciModel::ReturnResult(uint32_t data_id, const bool rslt_flg, const b
cur_dynamic_dims_.clear(); cur_dynamic_dims_.clear();
cur_dynamic_dims_.resize(shape_of_cur_dynamic_dims_); cur_dynamic_dims_.resize(shape_of_cur_dynamic_dims_);
GE_CHK_RT_RET(rtMemcpy(cur_dynamic_dims_.data(), shape_of_cur_dynamic_dims_ * sizeof(int64_t), GE_CHK_RT_RET(rtMemcpy(cur_dynamic_dims_.data(), shape_of_cur_dynamic_dims_ * sizeof(int64_t),
netoutput_last_input_addr_, netoutput_last_input_size_, RT_MEMCPY_DEVICE_TO_HOST));
netoutput_last_input_addr_, netoutput_last_input_size_, RT_MEMCPY_DEVICE_TO_HOST));
} }
GELOGD("Cur dynamic dims is %s.", formats::JoinToString(cur_dynamic_dims_).c_str()); GELOGD("Cur dynamic dims is %s.", formats::JoinToString(cur_dynamic_dims_).c_str());
if (GenOutputTensorInfo(op_desc, data_index, output_data, outputs) != SUCCESS) { if (GenOutputTensorInfo(op_desc, data_index, output_data, outputs) != SUCCESS) {


+ 2
- 2
ge/graph/load/new_model_manager/model_manager.cc View File

@@ -1055,8 +1055,8 @@ Status ModelManager::GenSessionId(uint64_t &session_id) {
Status ModelManager::LoadModelOffline(uint32_t &model_id, const ModelData &model, shared_ptr<ModelListener> listener, Status ModelManager::LoadModelOffline(uint32_t &model_id, const ModelData &model, shared_ptr<ModelListener> listener,
void *dev_ptr, size_t mem_size, void *weight_ptr, size_t weight_size) { void *dev_ptr, size_t mem_size, void *weight_ptr, size_t weight_size) {
GE_CHK_BOOL_RET_STATUS(model.key.empty() || mmAccess2(model.key.c_str(), M_F_OK) == EN_OK, GE_CHK_BOOL_RET_STATUS(model.key.empty() || mmAccess2(model.key.c_str(), M_F_OK) == EN_OK,
ACL_ERROR_GE_PARAM_INVALID,
"input key file path %s is invalid, %s", model.key.c_str(), strerror(errno));
ACL_ERROR_GE_PARAM_INVALID, "input key file path %s is invalid, %s",
model.key.c_str(), strerror(errno));
GenModelId(&model_id); GenModelId(&model_id);


shared_ptr<DavinciModel> davinci_model = nullptr; shared_ptr<DavinciModel> davinci_model = nullptr;


Loading…
Cancel
Save