From 1b05f22566a7dc074bdbe123b108bc78445fc9cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=A3=8A?= Date: Thu, 4 Mar 2021 15:13:12 +0800 Subject: [PATCH] remove ONLY_COMPILE_OPEN_SRC --- ge/graph/load/model_manager/davinci_model.cc | 14 -------------- ge/graph/passes/cond_remove_pass.cc | 4 ---- metadef | 2 +- parser | 2 +- 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/ge/graph/load/model_manager/davinci_model.cc b/ge/graph/load/model_manager/davinci_model.cc index 9ce4f595..7355714b 100755 --- a/ge/graph/load/model_manager/davinci_model.cc +++ b/ge/graph/load/model_manager/davinci_model.cc @@ -3421,7 +3421,6 @@ Status DavinciModel::InitConstant(const OpDescPtr &op_desc) { elem_num = 1; } uint64_t *buff = reinterpret_cast(tensor->MutableData().data()); -#ifndef ONLY_COMPILE_OPEN_SRC if (ge::CheckInt64Uint32MulOverflow(elem_num, kBytes * kStringHeadElems) != SUCCESS) { GELOGE(FAILED, "Shape size is invalid"); return FAILED; @@ -3433,19 +3432,6 @@ Status DavinciModel::InitConstant(const OpDescPtr &op_desc) { for (int64_t i = elem_num - 1; i >= 0; --i) { buff[i * kStringHeadElems] = hbm_raw_data_base_addr + (buff[i * kStringHeadElems] - buff[0]); } -#else - if (ge::CheckInt64Uint32MulOverflow(elem_num, kBytes) != SUCCESS) { - GELOGE(FAILED, "Shape size is invalid"); - return FAILED; - } - uint64_t offset = elem_num * kBytes; - - uint64_t hbm_raw_data_base_addr = - static_cast(reinterpret_cast(v_output_addr[0])) + offset; - for (int64_t i = elem_num - 1; i >= 0; --i) { - buff[i] = hbm_raw_data_base_addr + (buff[i] - buff[0]); - } -#endif } GELOGI("[IMAS]InitConstant memcpy graph_%u type[V] name[%s] output[%d] memaddr[%p] mem_size[%lu] datasize[%zu]", runtime_param_.graph_id, op_desc->GetName().c_str(), 0, v_output_addr[0], v_output_size[0], diff --git a/ge/graph/passes/cond_remove_pass.cc b/ge/graph/passes/cond_remove_pass.cc index 506cb5ff..5fc41714 100644 --- a/ge/graph/passes/cond_remove_pass.cc +++ b/ge/graph/passes/cond_remove_pass.cc @@ -27,11 +27,7 @@ const uint32_t kFalseIndex = 0; /// Extra 8 bytes store pointer of string /// Extra 8 bytes store length of string /// Extra 1 byte store '\0' -#ifndef ONLY_COMPILE_OPEN_SRC const int32_t kStrHeadLen = sizeof(ge::StringHead) + 1; -#else -const int32_t kStrHeadLen = 9; -#endif const int32_t kInvalidRetVal = -1; } diff --git a/metadef b/metadef index 711f8dae..781bdcdf 160000 --- a/metadef +++ b/metadef @@ -1 +1 @@ -Subproject commit 711f8dae37dfcc2db259c94edf2803986f12e2e3 +Subproject commit 781bdcdff510f62fe1c5ca6b1b18c5a8e15724c4 diff --git a/parser b/parser index 86162f60..227b1035 160000 --- a/parser +++ b/parser @@ -1 +1 @@ -Subproject commit 86162f60807c063f7344f902e443fc99657be637 +Subproject commit 227b10355427038785e95c81a41cda99893eba08