Browse Source

!1195 remove ONLY_COMPILE_OPEN_SRC

From: @li-lei0106
Reviewed-by: @wqtshg,@xchu42
Signed-off-by: @wqtshg
tags/v1.2.0
mindspore-ci-bot Gitee 3 years ago
parent
commit
49f465d8e3
4 changed files with 2 additions and 20 deletions
  1. +0
    -14
      ge/graph/load/model_manager/davinci_model.cc
  2. +0
    -4
      ge/graph/passes/cond_remove_pass.cc
  3. +1
    -1
      metadef
  4. +1
    -1
      parser

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

@@ -3421,7 +3421,6 @@ Status DavinciModel::InitConstant(const OpDescPtr &op_desc) {
elem_num = 1;
}
uint64_t *buff = reinterpret_cast<uint64_t *>(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<uint64_t>(reinterpret_cast<uintptr_t>(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],


+ 0
- 4
ge/graph/passes/cond_remove_pass.cc View File

@@ -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;
}



+ 1
- 1
metadef

@@ -1 +1 @@
Subproject commit 711f8dae37dfcc2db259c94edf2803986f12e2e3
Subproject commit 781bdcdff510f62fe1c5ca6b1b18c5a8e15724c4

+ 1
- 1
parser

@@ -1 +1 @@
Subproject commit 86162f60807c063f7344f902e443fc99657be637
Subproject commit 227b10355427038785e95c81a41cda99893eba08

Loading…
Cancel
Save