Browse Source

update code from yellow zone 20201013

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

+ 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.


+ 1
- 1
ge/common/thread_pool.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/thread_pool.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/types.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.
@@ -384,6 +384,7 @@ REGISTER_OPTYPE_DEFINE(HCOMREDUCESCATTER, "HcomReduceScatter");
REGISTER_OPTYPE_DEFINE(HCOMSEND, "HcomSend");
REGISTER_OPTYPE_DEFINE(HCOMRECEIVE, "HcomReceive");
REGISTER_OPTYPE_DEFINE(HCOMREMOTEREAD, "HcomRemoteRead");
REGISTER_OPTYPE_DEFINE(HCOMREMOTEREFREAD, "HcomRemoteRefRead");
REGISTER_OPTYPE_DEFINE(HCOMREMOTEWRITE, "HcomRemoteWrite");

REGISTER_OPTYPE_DEFINE(VARASSIGN, "VarAssign");


+ 2
- 2
ge/common/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.
@@ -472,7 +472,7 @@ FMK_FUNC_HOST_VISIBILITY bool ValidateStr(const std::string &str, const std::str
return true;
}

ret = regexec(&reg, str.c_str(), 0, nullptr, 0);
ret = regexec(&reg, str.c_str(), 0, NULL, 0);
if (ret) {
regerror(ret, &reg, ebuff, kMaxBuffSize);
GELOGE(ge::PARAM_INVALID, "regexec failed, reason: %s", ebuff);


+ 1
- 1
ge/executor/ge_executor.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.


+ 11
- 0
ge/executor/module.mk View File

@@ -50,6 +50,7 @@ local_ge_executor_src_files := \
../graph/load/new_model_manager/task_info/end_graph_task_info.cc \
../graph/load/new_model_manager/task_info/super_kernel/super_kernel_factory.cc \
../graph/load/new_model_manager/task_info/super_kernel/super_kernel.cc \
../opskernel_manager/ops_kernel_builder_manager.cc \
../single_op/single_op_manager.cc \
../single_op/single_op_model.cc \
../single_op/single_op.cc \
@@ -104,6 +105,12 @@ LOCAL_SRC_FILES := $(local_ge_executor_src_files)
LOCAL_C_INCLUDES := $(local_ge_executor_c_include)

LOCAL_SHARED_LIBRARIES := $(local_ge_executor_shared_library)

LOCAL_SHARED_LIBRARIES += libascend_hal

LOCAL_STATIC_LIBRARIES := \
libmsprofiler \

ifeq ($(device_os),android)
LOCAL_LDFLAGS += -ldl
LOCAL_LDLIBS += -L$(PWD)/prebuilts/clang/linux-x86/aarch64/android-ndk-r21/sysroot/usr/lib/aarch64-linux-android/29 -llog
@@ -140,6 +147,10 @@ LOCAL_SHARED_LIBRARIES := \
libregister \
libmsprof \
liberror_manager \
stub/libascend_hal \

LOCAL_STATIC_LIBRARIES := \
libmsprofiler \

LOCAL_LDFLAGS += $(local_ge_executor_ldflags)



+ 4
- 2
ge/ge_inference.mk View File

@@ -42,6 +42,7 @@ GRAPH_MANAGER_LOCAL_SRC_FILES := \
session/session_manager.cc \
engine_manager/dnnengine_manager.cc \
opskernel_manager/ops_kernel_manager.cc \
opskernel_manager/ops_kernel_builder_manager.cc \
graph/manager/graph_manager.cc \
graph/manager/graph_manager_utils.cc \
graph/manager/graph_context.cc \
@@ -57,6 +58,7 @@ GRAPH_MANAGER_LOCAL_SRC_FILES := \
graph/partition/engine_place.cc \
graph/partition/graph_partition.cc \
graph/partition/dynamic_shape_partition.cc \
graph/partition/stage_partition.cc \
generator/ge_generator.cc \
generator/generator_api.cc \
graph/manager/graph_var_manager.cc \
@@ -357,7 +359,7 @@ LOCAL_MODULE := libge_compiler

LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -DREUSE_MEMORY=1 -O2
# from ome_inference.mk
LOCAL_CFLAGS += -DFMK_HOST_INFER -DFMK_SUPPORT_DUMP
LOCAL_CFLAGS += -DFMK_HOST_INFER -DFMK_SUPPORT_DUMP -DCOMPILE_OMG_PACKAGE
ifeq ($(DEBUG), 1)
LOCAL_CFLAGS += -g -O0
endif
@@ -420,7 +422,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := libge_compiler
LOCAL_CFLAGS += -DGOOGLE_PROTOBUF_NO_RTTI -DDEV_VISIBILITY -DNONSUPPORT_SAVE_TO_FILE
LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0
LOCAL_CFLAGS += -DREUSE_MEMORY=1 -DFMK_SUPPORT_DUMP
LOCAL_CFLAGS += -DREUSE_MEMORY=1 -DFMK_SUPPORT_DUMP -DCOMPILE_OMG_PACKAGE
LOCAL_CFLAGS += -DOMG_DEVICE_VERSION
LOCAL_CFLAGS += -O2
LOCAL_MODULE_CLASS := SHARED_LIBRARIES


+ 1
- 1
ge/ge_local_engine/common/constant/constant.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