Browse Source

!89 update the newest code from yellow zone 20201013

Merge pull request !89 from taoxiangdong/master
tags/v1.1.0
lujiale Gitee 5 years ago
parent
commit
6bdce9bdc1
100 changed files with 154 additions and 148 deletions
  1. +5
    -2
      CMakeLists.txt
  2. +1
    -1
      cmake/external_libs/gflags.cmake
  3. +1
    -1
      cmake/external_libs/json.cmake
  4. +2
    -2
      cmake/external_libs/onnx.cmake
  5. +1
    -1
      cmake/external_libs/protobuf_shared.cmake
  6. +1
    -1
      cmake/external_libs/protobuf_static.cmake
  7. +1
    -1
      cmake/external_libs/protoc.cmake
  8. +1
    -1
      cmake/external_libs/securec.cmake
  9. +5
    -7
      ge/analyzer/analyzer.cc
  10. +1
    -1
      ge/analyzer/analyzer.h
  11. +4
    -0
      ge/client/ge_api.cc
  12. +19
    -6
      ge/client/ge_prof.cc
  13. +1
    -1
      ge/common/auth/file_saver.cc
  14. +1
    -1
      ge/common/auth/file_saver.h
  15. +1
    -1
      ge/common/base64.h
  16. +1
    -1
      ge/common/context/ctx.cc
  17. +1
    -1
      ge/common/cust_aicpu_kernel_store.cc
  18. +1
    -1
      ge/common/cust_aicpu_kernel_store.h
  19. +1
    -1
      ge/common/debug/memory_dumper.cc
  20. +1
    -1
      ge/common/debug/memory_dumper.h
  21. +1
    -1
      ge/common/dump/dump_manager.cc
  22. +1
    -1
      ge/common/dump/dump_manager.h
  23. +10
    -10
      ge/common/dump/dump_op.cc
  24. +1
    -1
      ge/common/dump/dump_op.h
  25. +1
    -1
      ge/common/dump/dump_properties.cc
  26. +1
    -1
      ge/common/dump/dump_properties.h
  27. +1
    -1
      ge/common/dump/dump_server.cc
  28. +1
    -1
      ge/common/fmk_error_codes.cc
  29. +1
    -1
      ge/common/formats/format_transfers/datatype_transfer.cc
  30. +1
    -1
      ge/common/formats/format_transfers/datatype_transfer.h
  31. +1
    -1
      ge/common/formats/format_transfers/format_transfer_c1hwncoc0_hwcn.cc
  32. +1
    -1
      ge/common/formats/format_transfers/format_transfer_c1hwncoc0_hwcn.h
  33. +2
    -1
      ge/common/formats/format_transfers/format_transfer_dhwcn_fracz3D.cc
  34. +2
    -1
      ge/common/formats/format_transfers/format_transfer_dhwcn_fracz3D.h
  35. +2
    -1
      ge/common/formats/format_transfers/format_transfer_dhwnc_fracz3D_transpose.cc
  36. +2
    -1
      ge/common/formats/format_transfers/format_transfer_dhwnc_fracz3D_transpose.h
  37. +1
    -1
      ge/common/formats/format_transfers/format_transfer_fractal_nz.cc
  38. +1
    -1
      ge/common/formats/format_transfers/format_transfer_fractal_nz.h
  39. +1
    -1
      ge/common/formats/format_transfers/format_transfer_fractal_z.cc
  40. +1
    -1
      ge/common/formats/format_transfers/format_transfer_fractal_z.h
  41. +1
    -1
      ge/common/formats/format_transfers/format_transfer_fractal_zz.cc
  42. +1
    -1
      ge/common/formats/format_transfers/format_transfer_fractal_zz.h
  43. +1
    -1
      ge/common/formats/format_transfers/format_transfer_fracz_hwcn.cc
  44. +1
    -1
      ge/common/formats/format_transfers/format_transfer_fracz_hwcn.h
  45. +1
    -1
      ge/common/formats/format_transfers/format_transfer_fracz_nchw.cc
  46. +1
    -1
      ge/common/formats/format_transfers/format_transfer_fracz_nchw.h
  47. +1
    -1
      ge/common/formats/format_transfers/format_transfer_fracz_nhwc.cc
  48. +1
    -1
      ge/common/formats/format_transfers/format_transfer_fracz_nhwc.h
  49. +1
    -1
      ge/common/formats/format_transfers/format_transfer_hwcn_c1hwncoc0.cc
  50. +1
    -1
      ge/common/formats/format_transfers/format_transfer_hwcn_c1hwncoc0.h
  51. +1
    -1
      ge/common/formats/format_transfers/format_transfer_nc1hwc0_nchw.cc
  52. +1
    -1
      ge/common/formats/format_transfers/format_transfer_nc1hwc0_nchw.h
  53. +1
    -1
      ge/common/formats/format_transfers/format_transfer_nc1hwc0_nhwc.cc
  54. +1
    -1
      ge/common/formats/format_transfers/format_transfer_nc1hwc0_nhwc.h
  55. +1
    -1
      ge/common/formats/format_transfers/format_transfer_nchw_fz_c04.cc
  56. +1
    -1
      ge/common/formats/format_transfers/format_transfer_nchw_fz_c04.h
  57. +1
    -1
      ge/common/formats/format_transfers/format_transfer_nchw_nc1hwc0.cc
  58. +1
    -1
      ge/common/formats/format_transfers/format_transfer_nchw_nc1hwc0.h
  59. +1
    -1
      ge/common/formats/format_transfers/format_transfer_nhwc_nc1hwc0.cc
  60. +1
    -1
      ge/common/formats/format_transfers/format_transfer_nhwc_nc1hwc0.h
  61. +1
    -1
      ge/common/formats/format_transfers/format_transfer_transpose.cc
  62. +1
    -1
      ge/common/formats/format_transfers/format_transfer_transpose.h
  63. +1
    -1
      ge/common/formats/formats.cc
  64. +1
    -1
      ge/common/formats/formats.h
  65. +1
    -1
      ge/common/formats/utils/formats_definitions.h
  66. +1
    -1
      ge/common/formats/utils/formats_trans_utils.cc
  67. +1
    -1
      ge/common/formats/utils/formats_trans_utils.h
  68. +1
    -1
      ge/common/fp16_t.cc
  69. +1
    -1
      ge/common/fp16_t.h
  70. +2
    -2
      ge/common/ge/datatype_util.cc
  71. +1
    -1
      ge/common/ge/datatype_util.h
  72. +1
    -1
      ge/common/ge/ge_util.h
  73. +1
    -1
      ge/common/ge/op_tiling_manager.cc
  74. +1
    -1
      ge/common/ge/op_tiling_manager.h
  75. +1
    -1
      ge/common/ge/plugin_manager.cc
  76. +1
    -1
      ge/common/ge/plugin_manager.h
  77. +1
    -1
      ge/common/ge/tbe_plugin_manager.cc
  78. +1
    -1
      ge/common/ge/tbe_plugin_manager.h
  79. +0
    -1
      ge/common/helper/model_cache_helper.cc
  80. +1
    -1
      ge/common/helper/model_helper.cc
  81. +1
    -1
      ge/common/helper/om_file_helper.cc
  82. +1
    -1
      ge/common/kernel_store.cc
  83. +1
    -1
      ge/common/kernel_store.h
  84. +1
    -1
      ge/common/math/fp16_math.cc
  85. +1
    -1
      ge/common/math/fp16_math.h
  86. +1
    -1
      ge/common/math/math_util.h
  87. +1
    -1
      ge/common/math_util.h
  88. +1
    -1
      ge/common/model_parser/base.cc
  89. +1
    -1
      ge/common/model_parser/base.h
  90. +1
    -1
      ge/common/model_saver.cc
  91. +1
    -1
      ge/common/model_saver.h
  92. +1
    -1
      ge/common/op/attr_value_util.cc
  93. +1
    -1
      ge/common/op/ge_op_utils.cc
  94. +10
    -26
      ge/common/profiling/profiling_manager.cc
  95. +2
    -2
      ge/common/profiling/profiling_manager.h
  96. +1
    -1
      ge/common/properties_manager.cc
  97. +1
    -1
      ge/common/properties_manager.h
  98. +2
    -1
      ge/common/singleton.h
  99. +1
    -1
      ge/common/tbe_kernel_store.cc
  100. +1
    -1
      ge/common/tbe_kernel_store.h

+ 5
- 2
CMakeLists.txt View File

@@ -26,15 +26,17 @@ if (ENABLE_OPEN_SRC)
set(ASCEND_DIR /usr/local/Ascend)
endif()

set(ASCEND_DRIVER_DIR ${ASCEND_DIR}/driver/lib64/common)
set(ASCEND_DRIVER_DIR ${ASCEND_DIR}/driver/lib64)
set(ASCEND_DRIVER_COMMON_DIR ${ASCEND_DIR}/driver/lib64/common)
set(ASCEND_RUNTIME_DIR ${ASCEND_DIR}/fwkacllib/lib64)
set(ASCEND_ATC_DIR ${ASCEND_DIR}/atc/lib64)
find_module(slog libslog.so ${ASCEND_DRIVER_DIR})
find_module(mmpa libmmpa.so ${ASCEND_DRIVER_DIR})
find_module(msprof libmsprof.so ${ASCEND_DRIVER_DIR})
find_module(hccl libhccl.so ${ASCEND_RUNTIME_DIR})
find_module(adump_server libadump_server.a ${ASCEND_RUNTIME_DIR})
find_module(runtime libruntime.so ${ASCEND_RUNTIME_DIR})
find_module(runtime_compile libruntime_compile.so ${ASCEND_RUNTIME_DIR})
find_module(runtime_compile libruntime_compile.so ${ASCEND_ATC_DIR})
find_module(resource libresource.so ${ASCEND_RUNTIME_DIR})
find_module(error_manager liberror_manager.so ${ASCEND_RUNTIME_DIR})
find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR})
@@ -44,6 +46,7 @@ if (ENABLE_OPEN_SRC)
set(GE_DEPEND_DIR ${CMAKE_CURRENT_LIST_DIR}/..)

add_subdirectory(metadef)
add_subdirectory(parser)
#add_subdirectory(metadef/graph)
#add_subdirectory(metadef/register)
else()


+ 1
- 1
cmake/external_libs/gflags.cmake View File

@@ -12,7 +12,7 @@ if ((${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local) OR
endif()

ExternalProject_Add(gflags_build
#URL http://tfk.inhuawei.com/api/containers/container1/download/protobuf-3.8.0.tar.gz
URL https://github.com/gflags/gflags/archive/v2.2.2.tar.gz
#URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz
SOURCE_DIR ${GE_CODE_DIR}/../third_party/gflags/src/gflags-2.2.2
CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}/gflags <SOURCE_DIR>


+ 1
- 1
cmake/external_libs/json.cmake View File

@@ -6,7 +6,7 @@ include(ExternalProject)

set(JSON_SRC_DIR ${GE_CODE_DIR}/../third_party/json/include)
ExternalProject_Add(json_build
#URL https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip
URL https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip
#URL /home/txd/workspace/cloud_code/pkg/include.zip
SOURCE_DIR ${JSON_SRC_DIR}
CONFIGURE_COMMAND ""


+ 2
- 2
cmake/external_libs/onnx.cmake View File

@@ -7,8 +7,8 @@ set(ONNX_PROTO_FILE ${ONNX_PROTO_DIR}/onnx.proto)
file(MAKE_DIRECTORY ${ONNX_PROTO_DIR})

ExternalProject_Add(onnx
#URL https://github.com/onnx/onnx/releases/download/v1.6.0/onnx-1.6.0.tar.gz
URL /home/txd/workspace/cloud_code/pkg/onnx-1.6.0.tar.gz
URL https://github.com/onnx/onnx/releases/download/v1.6.0/onnx-1.6.0.tar.gz
#URL /home/txd/workspace/cloud_code/pkg/onnx-1.6.0.tar.gz
#URL_HASH SHA256=3b88c3fe521151651a0403c4d131cb2e0311bd28b753ef692020a432a81ce345
#SOURCE_DIR ${ONNX_SRC_DIR}
CONFIGURE_COMMAND ""


+ 1
- 1
cmake/external_libs/protobuf_shared.cmake View File

@@ -14,7 +14,7 @@ endif()
set(protobuf_CXXFLAGS "-Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 $<$<STREQUAL:${PRODUCT_SIDE},host>:-D_GLIBCXX_USE_CXX11_ABI=0> -O2")
set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack")
ExternalProject_Add(protobuf_build
#URL http://tfk.inhuawei.com/api/containers/container1/download/protobuf-3.8.0.tar.gz
URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz
#URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz
#SOURCE_DIR ${GE_CODE_DIR}/third_party/protobuf/src/protobuf-3.8.0
DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${GE_CODE_DIR}/../third_party/protobuf/src/protobuf-3.8.0 <SOURCE_DIR>


+ 1
- 1
cmake/external_libs/protobuf_static.cmake View File

@@ -12,7 +12,7 @@ set(protobuf_CXXFLAGS "-Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -fst
set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack")
set(PROTOBUF_STATIC_PKG_DIR ${CMAKE_INSTALL_PREFIX}/protobuf_static)
ExternalProject_Add(protobuf_static_build
#URL http://tfk.inhuawei.com/api/containers/container1/download/protobuf-3.8.0.tar.gz
URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz
#URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz
SOURCE_DIR ${GE_CODE_DIR}/../third_party/protobuf/src/protobuf-3.8.0
CONFIGURE_COMMAND ${CMAKE_COMMAND}


+ 1
- 1
cmake/external_libs/protoc.cmake View File

@@ -15,7 +15,7 @@ endif()
set(protobuf_CXXFLAGS "-Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -D_GLIBCXX_USE_CXX11_ABI=0 -O2")
set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack")
ExternalProject_Add(protoc_build
#URL http://tfk.inhuawei.com/api/containers/container1/download/protobuf-3.8.0.tar.gz
URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz
#URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz
SOURCE_DIR ${GE_CODE_DIR}/../third_party/protobuf/src/protobuf-3.8.0
CONFIGURE_COMMAND ${CMAKE_COMMAND} -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=${protobuf_CXXFLAGS} -DCMAKE_CXX_LDFLAGS=${protobuf_LDFLAGS} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}/protoc <SOURCE_DIR>/cmake


+ 1
- 1
cmake/external_libs/securec.cmake View File

@@ -11,7 +11,7 @@ if ((${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local) OR
endif()

ExternalProject_Add(c_sec_build
#URL http://tfk.inhuawei.com/api/containers/container1/download/protobuf-3.8.0.tar.gz
URL https://gitee.com/openeuler/libboundscheck/repository/archive/v1.1.10.tar.gz
#URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz
SOURCE_DIR ${GE_CODE_DIR}/../libc_sec
CONFIGURE_COMMAND ${CMAKE_COMMAND}


+ 5
- 7
ge/analyzer/analyzer.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -77,9 +77,8 @@ Status Analyzer::BuildJsonObject(uint64_t session_id, uint64_t graph_id) {
std::lock_guard<std::recursive_mutex> lg(mutex_);
auto iter = graph_infos_.find(session_id);
if (iter == graph_infos_.end()) {
auto p = new(std::nothrow) GraphInfo();
GE_CHECK_NOTNULL(p);
std::shared_ptr<GraphInfo> graph_info(p);
std::shared_ptr<GraphInfo> graph_info(new(std::nothrow) GraphInfo());
GE_CHECK_NOTNULL(graph_info);
std::map<uint64_t, std::shared_ptr<GraphInfo>> graph_map;
graph_map[graph_id] = graph_info;
graph_info->session_id = session_id;
@@ -88,9 +87,8 @@ Status Analyzer::BuildJsonObject(uint64_t session_id, uint64_t graph_id) {
} else {
auto iter1 = (iter->second).find(graph_id);
if (iter1 == (iter->second).end()) {
auto p = new(std::nothrow) GraphInfo();
GE_CHECK_NOTNULL(p);
std::shared_ptr<GraphInfo> graph_info(p);
std::shared_ptr<GraphInfo> graph_info(new(std::nothrow) GraphInfo());
GE_CHECK_NOTNULL(graph_info);
graph_info->session_id = session_id;
graph_info->graph_id = graph_id;
(iter->second).insert({graph_id, graph_info});


+ 1
- 1
ge/analyzer/analyzer.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 4
- 0
ge/client/ge_api.cc View File

@@ -16,6 +16,7 @@

#include "ge/ge_api.h"
#include <iostream>
#include <malloc.h>
#include "common/debug/log.h"
#include "framework/common/debug/ge_log.h"
#include "common/ge/datatype_util.h"
@@ -163,6 +164,9 @@ Status GEFinalize() {
g_ge_initialized = false;
}

// to avoid memory fragment, use malloc_trim to back free stack to system
malloc_trim(0);

GELOGT(TRACE_STOP, "GEFinalize finished");
return ret;
}


+ 19
- 6
ge/client/ge_prof.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -324,10 +324,17 @@ Status aclgrphProfStop(aclgrphProfConfig *profiler_config) {
return GE_PROF_NOT_INIT;
}

Status ret = ProfStopProfiling(&profiler_config->config);
if (ret != SUCCESS) {
GELOGE(ret, "Stop profiling failed, prof result = %d", ret);
return ret;
for (uint32_t i = 0; i < profiler_config->config.devNums; i++) {
uint64_t data_type_config;
Status status = ProfGetDataTypeConfig(profiler_config->config.devIdList[i], data_type_config);
if (status != SUCCESS) {
GELOGE(status, "Prof get data type config failed, prof result = %d", status);
return status;
}
if (data_type_config != profiler_config->config.dataTypeConfig) {
GELOGE(FAILED, "data type config verify failed");
return FAILED;
}
}

std::vector<string> prof_params;
@@ -344,12 +351,18 @@ Status aclgrphProfStop(aclgrphProfConfig *profiler_config) {
command.module_index = profiler_config->config.dataTypeConfig;
GELOGI("Profiling will stop, device nums:%s , deviceID:[%s], data type config: 0x%llx", prof_params[0].c_str(),
prof_params[kDeviceListIndex].c_str(), command.module_index);
ret = graph_loader.CommandHandle(command);
Status ret = graph_loader.CommandHandle(command);
if (ret != SUCCESS) {
GELOGE(ret, "Handle profiling command failed");
return FAILED;
}

ret = ProfStopProfiling(&profiler_config->config);
if (ret != SUCCESS) {
GELOGE(ret, "Stop profiling failed, prof result = %d", ret);
return ret;
}

GELOGI("Successfully execute GraphProfStopProfiling.");
return SUCCESS;
}


+ 1
- 1
ge/common/auth/file_saver.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/auth/file_saver.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/base64.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/context/ctx.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/cust_aicpu_kernel_store.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/cust_aicpu_kernel_store.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/debug/memory_dumper.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/debug/memory_dumper.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/dump/dump_manager.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/dump/dump_manager.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 10
- 10
ge/common/dump/dump_op.cc View File

@@ -172,18 +172,18 @@ Status DumpOp::ExecutorDumpOp(aicpu::dump::OpMappingInfo &op_mapping_info) {
return RT_FAILED;
}

constexpr int32_t ioAddrNum = 2;
constexpr uint32_t argsSize = sizeof(aicpu::AicpuParamHead) + ioAddrNum * sizeof(uint64_t);
char args[argsSize] = {0};
auto paramHead = reinterpret_cast<aicpu::AicpuParamHead *>(args);
paramHead->length = argsSize;
paramHead->ioAddrNum = ioAddrNum;
auto ioAddr = reinterpret_cast<uint64_t *>(args + sizeof(aicpu::AicpuParamHead));
ioAddr[0] = reinterpret_cast<uintptr_t>(proto_dev_mem_);
ioAddr[1] = reinterpret_cast<uintptr_t>(proto_size_dev_mem_);
constexpr int32_t io_addr_num = 2;
constexpr uint32_t args_size = sizeof(aicpu::AicpuParamHead) + io_addr_num * sizeof(uint64_t);
char args[args_size] = {0};
auto param_head = reinterpret_cast<aicpu::AicpuParamHead *>(args);
param_head->length = args_size;
param_head->ioAddrNum = io_addr_num;
auto io_addr = reinterpret_cast<uint64_t *>(args + sizeof(aicpu::AicpuParamHead));
io_addr[0] = reinterpret_cast<uintptr_t>(proto_dev_mem_);
io_addr[1] = reinterpret_cast<uintptr_t>(proto_size_dev_mem_);
rt_ret = rtCpuKernelLaunch(nullptr, kDumpKernelsDumpOp,
1, // blockDim default 1
args, argsSize,
args, args_size,
nullptr, // no need smDesc
stream_);
if (rt_ret != RT_ERROR_NONE) {


+ 1
- 1
ge/common/dump/dump_op.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/dump/dump_properties.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/dump/dump_properties.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/dump/dump_server.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/fmk_error_codes.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/datatype_transfer.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/datatype_transfer.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_c1hwncoc0_hwcn.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_c1hwncoc0_hwcn.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 2
- 1
ge/common/formats/format_transfers/format_transfer_dhwcn_fracz3D.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include "common/formats/format_transfers/format_transfer_dhwcn_fracz3D.h"

#include <securec.h>


+ 2
- 1
ge/common/formats/format_transfers/format_transfer_dhwcn_fracz3D.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef GE_COMMON_FORMATS_FORMAT_TRANSFERS_FORMAT_TRANSFER_DHWCN_FRACTAL_Z_3D_H_
#define GE_COMMON_FORMATS_FORMAT_TRANSFERS_FORMAT_TRANSFER_DHWCN_FRACTAL_Z_3D_H_



+ 2
- 1
ge/common/formats/format_transfers/format_transfer_dhwnc_fracz3D_transpose.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include "common/formats/format_transfers/format_transfer_dhwnc_fracz3D_transpose.h"

#include <securec.h>


+ 2
- 1
ge/common/formats/format_transfers/format_transfer_dhwnc_fracz3D_transpose.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef GE_COMMON_FORMATS_FORMAT_TRANSFERS_FORMAT_TRANSFER_DHWNC_FRACTAL_Z_3D_TRANSPOSE_H_
#define GE_COMMON_FORMATS_FORMAT_TRANSFERS_FORMAT_TRANSFER_DHWNC_FRACTAL_Z_3D_TRANSPOSE_H_



+ 1
- 1
ge/common/formats/format_transfers/format_transfer_fractal_nz.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_fractal_nz.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_fractal_z.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_fractal_z.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_fractal_zz.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2019 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_fractal_zz.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2019 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_fracz_hwcn.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_fracz_hwcn.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_fracz_nchw.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_fracz_nchw.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_fracz_nhwc.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_fracz_nhwc.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_hwcn_c1hwncoc0.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_hwcn_c1hwncoc0.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_nc1hwc0_nchw.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_nc1hwc0_nchw.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_nc1hwc0_nhwc.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_nc1hwc0_nhwc.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_nchw_fz_c04.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_nchw_fz_c04.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_nchw_nc1hwc0.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_nchw_nc1hwc0.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_nhwc_nc1hwc0.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_nhwc_nc1hwc0.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_transpose.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_transpose.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/formats.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2019 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/formats.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/utils/formats_definitions.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2019 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/utils/formats_trans_utils.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/formats/utils/formats_trans_utils.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2019 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/fp16_t.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/fp16_t.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 2
- 2
ge/common/ge/datatype_util.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@ std::map<ge::DataType, std::vector<ge::DataType>> g_reverse_translatable_data_ty
{ge::DT_INT32, {ge::DT_BOOL, ge::DT_INT64}},
{ge::DT_FLOAT, {ge::DT_FLOAT16, ge::DT_FLOAT}}};

static const std::map<ge::DataType, ge::proto::DataType> g_dump_data_type_map = {
std::map<ge::DataType, ge::proto::DataType> g_dump_data_type_map = {
// key:ge datatype,value:proto datatype
{ge::DT_UNDEFINED, ge::proto::DT_UNDEFINED},
{ge::DT_FLOAT, ge::proto::DT_FLOAT},


+ 1
- 1
ge/common/ge/datatype_util.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/ge/ge_util.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/ge/op_tiling_manager.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/ge/op_tiling_manager.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/ge/plugin_manager.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/ge/plugin_manager.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/ge/tbe_plugin_manager.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/ge/tbe_plugin_manager.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 0
- 1
ge/common/helper/model_cache_helper.cc View File

@@ -1496,7 +1496,6 @@ Status ModelCacheHelper::ParseMemResourceFromJson(const Json &json, map<rtMemTyp
}
mem_resource.clear();
for (const Json &mem_resource_json : json) {
MemResource var_addr_mgr;
try {
rtMemType_t mem_type = mem_resource_json[kMemType].get<rtMemType_t>();
uint64_t var_mem_size = mem_resource_json[kVarMemSize].get<int64_t>();


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

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


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

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/kernel_store.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/kernel_store.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/math/fp16_math.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/math/fp16_math.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/math/math_util.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/math_util.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/model_parser/base.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/model_parser/base.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/model_saver.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/model_saver.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/op/attr_value_util.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/op/ge_op_utils.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 10
- 26
ge/common/profiling/profiling_manager.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -51,12 +51,15 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ProfilingManager &ProfilingMana
return profiling_manager;
}

FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ge::Status ProfilingManager::Init(const Options &options,
bool convert_2_phy_device_id) {
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ge::Status ProfilingManager::Init(const Options &options) {
#ifdef DAVINCI_SUPPORT_PROFILING
vector<int32_t>().swap(device_id_);
job_id_ = options.job_id;

GELOGI("ProfilingManager::Init job_id:%s", job_id_.c_str());



Status ret;
if (!recv_profiling_config_.empty()) {
GELOGI("Profiling json config from acl:%s", recv_profiling_config_.c_str());
@@ -64,18 +67,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ge::Status ProfilingManager::In
} else {
ret = InitFromOptions(options);
if (ret == SUCCESS && is_load_profiling_) {
// profiling need phy device id
if (!convert_2_phy_device_id) {
device_id_.push_back(options.device_id);
} else {
uint32_t phy_device_id = 0;
rtError_t rt_ret = rtGetDevicePhyIdByIndex(static_cast<uint32_t>(options.device_id), &phy_device_id);
if (rt_ret != RT_ERROR_NONE) {
GELOGE(rt_ret, "runtime get phy_device_id failed, current phy_device_id:%u", phy_device_id);
return FAILED;
}
device_id_.push_back(phy_device_id);
}
device_id_.push_back(options.device_id);
}
}
if (ret != SUCCESS) {
@@ -554,25 +546,17 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY void ProfilingManager::ReportPr
return;
}
GELOGI("current logic_device_id:%d", logic_device_id);

uint32_t phy_device_id = 0;
rt_ret = rtGetDevicePhyIdByIndex((uint32_t)logic_device_id, &phy_device_id);
if (rt_ret != RT_ERROR_NONE) {
GELOGE(rt_ret, "runtime get phy_device_id failed, current phy_device_id:%d", phy_device_id);
return;
}
GELOGI("current phy_device_id:%d", phy_device_id);
if (!is_acl_api_mode_) {
auto ret = std::find(device_id_.begin(), device_id_.end(), phy_device_id);
auto ret = std::find(device_id_.begin(), device_id_.end(), logic_device_id);
if (ret == device_id_.end()) {
GELOGE(FAILED, "get valid phy_device_id failed, profiling report failed.");
return;
}
}
GELOGI("start ProfilingTaskDescInfo.");
ProfilingTaskDescInfo(task_desc_info, phy_device_id);
ProfilingTaskDescInfo(task_desc_info, logic_device_id);
GELOGI("start ProfilingGraphDescInfo.");
ProfilingGraphDescInfo(compute_graph_desc_info, phy_device_id);
ProfilingGraphDescInfo(compute_graph_desc_info, logic_device_id);
GELOGI("Report profiling data for GE end.");
#endif
}


+ 2
- 2
ge/common/profiling/profiling_manager.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -69,7 +69,7 @@ class FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ProfilingManager {
ProfilingManager();
virtual ~ProfilingManager();
static ProfilingManager &Instance();
ge::Status Init(const Options &options, bool convert_2_phy_device_id = false);
ge::Status Init(const Options &options);
ge::Status InitFromOptions(const Options &options);
ge::Status InitFromAclCfg(const std::string &config);
ge::Status StartProfiling(int32_t iter, int32_t device_id);


+ 1
- 1
ge/common/properties_manager.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/properties_manager.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 2
- 1
ge/common/singleton.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef GE_COMMON_SINGLETON_H_
#define GE_COMMON_SINGLETON_H_



+ 1
- 1
ge/common/tbe_kernel_store.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
ge/common/tbe_kernel_store.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save