!53 code sync for C75B100 master

Merge pull request !53 from HW_KK/master
pull/53/MERGE
mindspore-ci-bot 5 years ago committed by Gitee
commit 622af6c1c5

@ -174,9 +174,11 @@ echo "---------------- GraphEngine output generated ----------------"
# generate output package in tar form, including ut/st libraries/executables # generate output package in tar form, including ut/st libraries/executables
cd ${BASEPATH} cd ${BASEPATH}
mkdir -p output/plugin/nnengine/ge_config/ mkdir -p output/plugin/nnengine/ge_config/
mkdir -p output/plugin/opskernel/
find output/ -name graphengine_lib.tar -exec rm {} \; find output/ -name graphengine_lib.tar -exec rm {} \;
cp src/ge/engine_manager/engine_conf.json output/plugin/nnengine/ge_config/ cp src/ge/engine_manager/engine_conf.json output/plugin/nnengine/ge_config/
find output/ -maxdepth 1 -name libengine.so -exec mv -f {} output/plugin/nnengine/ \; find output/ -maxdepth 1 -name libengine.so -exec mv -f {} output/plugin/nnengine/ \;
find output/ -maxdepth 1 -name libge_local_engine.so -exec mv -f {} output/plugin/opskernel/ \;
tar -cf graphengine_lib.tar output/* tar -cf graphengine_lib.tar output/*
mv -f graphengine_lib.tar output mv -f graphengine_lib.tar output
echo "---------------- GraphEngine package archive generated ----------------" echo "---------------- GraphEngine package archive generated ----------------"

@ -52,5 +52,23 @@ struct GETaskInfo {
std::vector<GETaskKernelHcclInfo> kernelHcclInfo; std::vector<GETaskKernelHcclInfo> kernelHcclInfo;
}; };
struct HcomOpertion {
std::string hcclType;
void *inputPtr;
void *outputPtr;
uint64_t count;
int32_t dataType;
int32_t opType;
int32_t root;
};
struct HcomRemoteAccessAddrInfo {
uint32_t remotetRankID;
uint64_t remoteAddr; // host embedding table address
uint64_t localAddr; // device HBM address
uint64_t length; // memory Length in Bytes
};
} // namespace ge } // namespace ge
#endif // INC_COMMON_OPSKERNEL_GE_TASK_INFO_H_ #endif // INC_COMMON_OPSKERNEL_GE_TASK_INFO_H_

@ -43,10 +43,10 @@ class OpsKernelInfoStore {
virtual ~OpsKernelInfoStore() {} virtual ~OpsKernelInfoStore() {}
// initialize opsKernelInfoStore // initialize opsKernelInfoStore
virtual Status Initialize(const map<string, string> &options) = 0; virtual Status Initialize(const map<string, string> &options) = 0; /*lint -e148*/
// close opsKernelInfoStore // close opsKernelInfoStore
virtual Status Finalize() = 0; virtual Status Finalize() = 0; /*lint -e148*/
virtual Status CreateSession(const std::map<std::string, std::string> &session_options) { return SUCCESS; } virtual Status CreateSession(const std::map<std::string, std::string> &session_options) { return SUCCESS; }
@ -66,10 +66,11 @@ class OpsKernelInfoStore {
virtual void opsFlagCheck(const ge::Node &node, std::string &opsFlag){}; virtual void opsFlagCheck(const ge::Node &node, std::string &opsFlag){};
// memory allocation requirement // memory allocation requirement
virtual Status CalcOpRunningParam(Node &node) = 0; virtual Status CalcOpRunningParam(Node &node) = 0; /*lint -e148*/
// generate task for op。 // generate task for op。
virtual Status GenerateTask(const Node &node, RunContext &context, std::vector<domi::TaskDef> &tasks) = 0; virtual Status GenerateTask(const Node &node, RunContext &context,
std::vector<domi::TaskDef> &tasks) = 0; /*lint -e148*/
// only call fe engine interface to compile single op // only call fe engine interface to compile single op
virtual Status CompileOp(vector<ge::NodePtr> &node_vec) { return SUCCESS; } virtual Status CompileOp(vector<ge::NodePtr> &node_vec) { return SUCCESS; }

@ -26,6 +26,7 @@
using std::string; using std::string;
namespace ge { namespace ge {
/*lint -e148*/
struct RunContext { struct RunContext {
rtModel_t model; rtModel_t model;
rtStream_t stream; rtStream_t stream;
@ -40,6 +41,8 @@ struct RunContext {
std::vector<rtLabel_t> graphLabelList; // all labels of graph, order by ge label id(0,1,...) std::vector<rtLabel_t> graphLabelList; // all labels of graph, order by ge label id(0,1,...)
}; };
/*lint +e148*/
struct Task { struct Task {
uint32_t id; uint32_t id;
uint16_t type; uint16_t type;
@ -49,6 +52,7 @@ struct Task {
struct OpInfo { struct OpInfo {
string engine; // which engin string engine; // which engin
/*lint -e148*/
string opKernelLib; // which opsKernelStore string opKernelLib; // which opsKernelStore
int computeCost; // compute cost int computeCost; // compute cost
bool flagPartial; // whether to support is related to shape bool flagPartial; // whether to support is related to shape

@ -27,6 +27,7 @@
using std::map; using std::map;
using std::string; using std::string;
/*lint -e148*/
namespace ge { namespace ge {
class GraphOptimizer { class GraphOptimizer {
public: public:
@ -60,4 +61,5 @@ class GraphOptimizer {
virtual Status OptimizeStreamGraph(ComputeGraph &graph, const RunContext &context) { return SUCCESS; } virtual Status OptimizeStreamGraph(ComputeGraph &graph, const RunContext &context) { return SUCCESS; }
}; };
} // namespace ge } // namespace ge
/*lint +e148*/
#endif // INC_COMMON_OPTIMIZER_GRAPH_OPTIMIZER_H_ #endif // INC_COMMON_OPTIMIZER_GRAPH_OPTIMIZER_H_

@ -28,6 +28,7 @@ struct CompressConfig {
size_t channel; // channels of L2 or DDR. For load balance size_t channel; // channels of L2 or DDR. For load balance
size_t fractalSize; // size of compressing block size_t fractalSize; // size of compressing block
bool isTight; // whether compose compressed data tightly bool isTight; // whether compose compressed data tightly
size_t init_offset;
}; };
CmpStatus CompressWeights(char* input, const CompressConfig& compressConfig, char* indexs, char* output, CmpStatus CompressWeights(char* input, const CompressConfig& compressConfig, char* indexs, char* output,

@ -0,0 +1,33 @@
/**
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef COMPRESS_WEIGHT_H
#define COMPRESS_WEIGHT_H
#include "compress.h"
const int SHAPE_SIZE_WEIGHT = 4;
struct CompressOpConfig {
int64_t wShape[SHAPE_SIZE_WEIGHT];
size_t compressTilingK;
size_t compressTilingN;
struct CompressConfig compressConfig;
};
extern "C" CmpStatus CompressWeightsConv2D(const char *const input, char *const zipBuffer, char *const infoBuffer,
CompressOpConfig *const param);
#endif // COMPRESS_WEIGHT_H

@ -31,27 +31,37 @@ class ErrorManager {
/// ///
/// @brief init /// @brief init
/// @param [in] path current so path /// @param [in] path: current so path
/// @return int 0(success) -1(fail) /// @return int 0(success) -1(fail)
/// ///
int Init(std::string path); int Init(std::string path);
/// ///
/// @brief Report error message /// @brief Report error message
/// @param [in] errCode error code /// @param [in] error_code: error code
/// @param [in] mapArgs parameter map /// @param [in] args_map: parameter map
/// @return int 0(success) -1(fail) /// @return int 0(success) -1(fail)
/// ///
int ReportErrMessage(std::string error_code, const std::map<std::string, std::string> &args_map); int ReportErrMessage(std::string error_code, const std::map<std::string, std::string> &args_map);
///
/// @brief output error message /// @brief output error message
/// @param [in] handle print handle /// @param [in] handle: print handle
/// @return int 0(success) -1(fail) /// @return int 0(success) -1(fail)
/// ///
int OutputErrMessage(int handle); int OutputErrMessage(int handle);
///
/// @brief output message
/// @param [in] handle: print handle
/// @return int 0(success) -1(fail)
///
int OutputMessage(int handle);
///
/// @brief Report error message /// @brief Report error message
/// @param [in] vector parameter key, vector parameter value /// @param [in] key: vector parameter key
/// @param [in] value: vector parameter value
/// ///
void ATCReportErrMessage(std::string error_code, const std::vector<std::string> &key = {}, void ATCReportErrMessage(std::string error_code, const std::vector<std::string> &key = {},
const std::vector<std::string> &value = {}); const std::vector<std::string> &value = {});
@ -60,7 +70,7 @@ class ErrorManager {
struct ErrorInfo { struct ErrorInfo {
std::string error_id; std::string error_id;
std::string error_message; std::string error_message;
std::vector<std::string> arglist; std::vector<std::string> arg_list;
}; };
ErrorManager() {} ErrorManager() {}
@ -77,7 +87,8 @@ class ErrorManager {
bool is_init_ = false; bool is_init_ = false;
std::map<std::string, ErrorInfo> error_map_; std::map<std::string, ErrorInfo> error_map_;
std::vector<std::string> error_message_evc_; std::vector<std::string> error_messages_;
std::vector<std::string> warning_messages_;
}; };
#endif // ERROR_MANAGER_H_ #endif // ERROR_MANAGER_H_

@ -27,7 +27,6 @@ using std::string;
using std::vector; using std::vector;
namespace fe { namespace fe {
class PlatformInfoManager { class PlatformInfoManager {
public: public:
PlatformInfoManager(const PlatformInfoManager &) = delete; PlatformInfoManager(const PlatformInfoManager &) = delete;
@ -39,6 +38,8 @@ class PlatformInfoManager {
uint32_t GetPlatformInfo(const string SoCVersion, PlatformInfo &platformInfo, OptionalInfo &optiCompilationInfo); uint32_t GetPlatformInfo(const string SoCVersion, PlatformInfo &platformInfo, OptionalInfo &optiCompilationInfo);
uint32_t GetPlatformInfoWithOutSocVersion(PlatformInfo &platformInfo, OptionalInfo &optiCompilationInfo);
void SetOptionalCompilationInfo(OptionalInfo &optiCompilationInfo); void SetOptionalCompilationInfo(OptionalInfo &optiCompilationInfo);
private: private:
@ -81,6 +82,8 @@ class PlatformInfoManager {
void ParseVectorCoreMemoryRates(map<string, string> &vectorCoreMemoryRatesMap, PlatformInfo &platformInfoTemp); void ParseVectorCoreMemoryRates(map<string, string> &vectorCoreMemoryRatesMap, PlatformInfo &platformInfoTemp);
void ParseCPUCache(map<string, string> &CPUCacheMap, PlatformInfo &platformInfoTemp);
void ParseVectorCoreintrinsicDtypeMap(map<string, string> &vectorCoreintrinsicDtypeMap, void ParseVectorCoreintrinsicDtypeMap(map<string, string> &vectorCoreintrinsicDtypeMap,
PlatformInfo &platformInfoTemp); PlatformInfo &platformInfoTemp);
@ -94,6 +97,5 @@ class PlatformInfoManager {
map<string, PlatformInfo> platformInfoMap_; map<string, PlatformInfo> platformInfoMap_;
OptionalInfo optiCompilationInfo_; OptionalInfo optiCompilationInfo_;
}; };
} // namespace fe } // namespace fe
#endif #endif

@ -73,6 +73,8 @@ typedef struct tagAiCoreSpec {
typedef struct tagAiCoreMemoryRates { typedef struct tagAiCoreMemoryRates {
double ddrRate; double ddrRate;
double ddrReadRate;
double ddrWriteRate;
double l2Rate; double l2Rate;
double l2ReadRate; double l2ReadRate;
double l2WriteRate; double l2WriteRate;
@ -86,6 +88,7 @@ typedef struct tagAiCoreMemoryRates {
} AiCoreMemoryRates; } AiCoreMemoryRates;
typedef struct tagVectorCoreSpec { typedef struct tagVectorCoreSpec {
double vecFreq;
uint64_t vecCalcSize; uint64_t vecCalcSize;
uint64_t smaskBuffer; uint64_t smaskBuffer;
uint64_t ubSize; uint64_t ubSize;
@ -94,10 +97,15 @@ typedef struct tagVectorCoreSpec {
uint64_t ubbankNum; uint64_t ubbankNum;
uint64_t ubburstInOneBlock; uint64_t ubburstInOneBlock;
uint64_t ubbankGroupNum; uint64_t ubbankGroupNum;
uint64_t vectorRegSize;
uint64_t predicateRegSize;
uint64_t addressRegSize;
} VectorCoreSpec; } VectorCoreSpec;
typedef struct tagVectorCoreMemoryRates { typedef struct tagVectorCoreMemoryRates {
double ddrRate; double ddrRate;
double ddrReadRate;
double ddrWriteRate;
double l2Rate; double l2Rate;
double l2ReadRate; double l2ReadRate;
double l2WriteRate; double l2WriteRate;
@ -105,6 +113,11 @@ typedef struct tagVectorCoreMemoryRates {
double ubToDdrRate; double ubToDdrRate;
} VectorCoreMemoryRates; } VectorCoreMemoryRates;
typedef struct tagCPUCache {
uint32_t AICPUSyncBySW;
uint32_t TSCPUSyncBySW;
} CPUCache;
typedef struct tagPlatformInfo { typedef struct tagPlatformInfo {
StrInfo strInfo; StrInfo strInfo;
SoCInfo socInfo; SoCInfo socInfo;
@ -113,6 +126,7 @@ typedef struct tagPlatformInfo {
map<string, vector<string>> aiCoreIntrinsicDtypeMap; map<string, vector<string>> aiCoreIntrinsicDtypeMap;
VectorCoreSpec vectorCoreSpec; VectorCoreSpec vectorCoreSpec;
VectorCoreMemoryRates vectorCoreMemoryRates; VectorCoreMemoryRates vectorCoreMemoryRates;
CPUCache cpucache;
map<string, vector<string>> vectorCoreIntrinsicDtypeMap; map<string, vector<string>> vectorCoreIntrinsicDtypeMap;
} PlatformInfo; } PlatformInfo;

@ -70,7 +70,7 @@ using Status = uint32_t;
// General error code // General error code
GE_ERRORNO(0, 0, 0, 0, 0, SUCCESS, 0, "success"); GE_ERRORNO(0, 0, 0, 0, 0, SUCCESS, 0, "success");
GE_ERRORNO(0b11, 0b11, 0b111, 0xFF, 0b11111, FAILED, 0xFFF, "failed"); GE_ERRORNO(0b11, 0b11, 0b111, 0xFF, 0b11111, FAILED, 0xFFF, "failed"); /*lint !e401*/
} // namespace ge } // namespace ge
#endif // INC_EXTERNAL_GE_GE_API_ERROR_CODES_H_ #endif // INC_EXTERNAL_GE_GE_API_ERROR_CODES_H_

@ -44,8 +44,11 @@ const char *const OPTION_EXEC_ENABLE_DUMP = "ge.exec.enableDump";
const char *const OPTION_EXEC_DUMP_PATH = "ge.exec.dumpPath"; const char *const OPTION_EXEC_DUMP_PATH = "ge.exec.dumpPath";
const char *const OPTION_EXEC_DUMP_STEP = "ge.exec.dumpStep"; const char *const OPTION_EXEC_DUMP_STEP = "ge.exec.dumpStep";
const char *const OPTION_EXEC_DUMP_MODE = "ge.exec.dumpMode"; const char *const OPTION_EXEC_DUMP_MODE = "ge.exec.dumpMode";
const char *const OPTION_EXEC_ENABLE_DUMP_DEBUG = "ge.exec.enableDumpDebug";
const char *const OPTION_EXEC_DUMP_DEBUG_MODE = "ge.exec.dumpDebugMode";
const char *const OPTION_EXEC_ENABLE_INCRE_BUILD = "ge.exec.enableIncreBuild"; const char *const OPTION_EXEC_ENABLE_INCRE_BUILD = "ge.exec.enableIncreBuild";
const char *const OPTION_EXEC_INCRE_BUILD_CACHE_PATH = "ge.exec.increBuildCachePath"; const char *const OPTION_EXEC_INCRE_BUILD_CACHE_PATH = "ge.exec.increBuildCachePath";
const char *const OPTION_EXEC_ENABLE_SCOPE_FUSION_PASSES = "ge.exec.enableScopeFusionPasses";
// profiling flag // profiling flag
const char *const OPTION_EXEC_PROFILING_MODE = "ge.exec.profilingMode"; const char *const OPTION_EXEC_PROFILING_MODE = "ge.exec.profilingMode";
const char *const OPTION_EXEC_PROFILING_OPTIONS = "ge.exec.profilingOptions"; const char *const OPTION_EXEC_PROFILING_OPTIONS = "ge.exec.profilingOptions";
@ -170,6 +173,9 @@ const char *const kDynamicBatchSize = "ge.dynamicBatchSize";
// configure whether to use dynamic image size // configure whether to use dynamic image size
const char *const kDynamicImageSize = "ge.dynamicImageSize"; const char *const kDynamicImageSize = "ge.dynamicImageSize";
// Configure whether to use dynamic dims
const char *const kDynamicDims = "ge.dynamicDims";
// Configure auto tune mode, this option only take effect while AUTO_TUNE_FLAG is Y, // Configure auto tune mode, this option only take effect while AUTO_TUNE_FLAG is Y,
// example: GA|RL, support configure multiple, split by | // example: GA|RL, support configure multiple, split by |
const std::string AUTO_TUNE_MODE = "ge.autoTuneMode"; const std::string AUTO_TUNE_MODE = "ge.autoTuneMode";
@ -219,6 +225,10 @@ const char *const ENABLE_SINGLE_STREAM = "ge.enableSingleStream";
// Configure input fp16 nodes // Configure input fp16 nodes
const std::string INPUT_FP16_NODES = "ge.INPUT_NODES_SET_FP16"; const std::string INPUT_FP16_NODES = "ge.INPUT_NODES_SET_FP16";
// Configure debug level, its value should be 0(default), 1 or 2.
// 0: close debug; 1: open TBE compiler; 2: open ccec compiler
const std::string OP_DEBUG_LEVEL = "ge.opDebugLevel";
// Graph run mode // Graph run mode
enum GraphRunMode { PREDICTION = 0, TRAIN }; enum GraphRunMode { PREDICTION = 0, TRAIN };
@ -261,6 +271,7 @@ static const char *const INPUT_SHAPE = "input_shape";
static const char *const OP_NAME_MAP = "op_name_map"; static const char *const OP_NAME_MAP = "op_name_map";
static const char *const DYNAMIC_BATCH_SIZE = kDynamicBatchSize; static const char *const DYNAMIC_BATCH_SIZE = kDynamicBatchSize;
static const char *const DYNAMIC_IMAGE_SIZE = kDynamicImageSize; static const char *const DYNAMIC_IMAGE_SIZE = kDynamicImageSize;
static const char *const DYNAMIC_DIMS = kDynamicDims;
static const char *const INSERT_OP_FILE = ge::INSERT_OP_FILE.c_str(); static const char *const INSERT_OP_FILE = ge::INSERT_OP_FILE.c_str();
static const char *const PRECISION_MODE = ge::PRECISION_MODE.c_str(); static const char *const PRECISION_MODE = ge::PRECISION_MODE.c_str();
static const char *const EXEC_DISABLE_REUSED_MEMORY = ge::OPTION_EXEC_DISABLE_REUSED_MEMORY; static const char *const EXEC_DISABLE_REUSED_MEMORY = ge::OPTION_EXEC_DISABLE_REUSED_MEMORY;
@ -283,10 +294,11 @@ static const char *const OPTYPELIST_FOR_IMPLMODE = ge::OPTYPELIST_FOR_IMPLMODE.c
// for interface: aclgrphBuildModel // for interface: aclgrphBuildModel
const std::set<std::string> ir_builder_suppported_options = { const std::set<std::string> ir_builder_suppported_options = {
INPUT_FORMAT, INPUT_SHAPE, OP_NAME_MAP, DYNAMIC_BATCH_SIZE, INPUT_FORMAT, INPUT_SHAPE, OP_NAME_MAP,
DYNAMIC_IMAGE_SIZE, INSERT_OP_FILE, PRECISION_MODE, EXEC_DISABLE_REUSED_MEMORY, DYNAMIC_BATCH_SIZE, DYNAMIC_IMAGE_SIZE, DYNAMIC_DIMS,
AUTO_TUNE_MODE, OUTPUT_TYPE, OUT_NODES, INPUT_FP16_NODES, INSERT_OP_FILE, PRECISION_MODE, EXEC_DISABLE_REUSED_MEMORY,
LOG_LEVEL}; AUTO_TUNE_MODE, OUTPUT_TYPE, OUT_NODES,
INPUT_FP16_NODES, LOG_LEVEL};
// for interface: aclgrphBuildInitialize // for interface: aclgrphBuildInitialize
const std::set<std::string> global_options = {CORE_TYPE, const std::set<std::string> global_options = {CORE_TYPE,
SOC_VERSION, SOC_VERSION,

@ -34,6 +34,7 @@ using std::vector;
namespace ge { namespace ge {
class AttrValueImpl; class AttrValueImpl;
/*lint -e148*/
class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY AttrValue { class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY AttrValue {
public: public:
using INT = int64_t; using INT = int64_t;
@ -69,5 +70,6 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY AttrValue {
VALUE_SET_GET_DEC(AttrValue::FLOAT) VALUE_SET_GET_DEC(AttrValue::FLOAT)
#undef VALUE_SET_GET_DEC #undef VALUE_SET_GET_DEC
}; };
/*lint +e148*/
} // namespace ge } // namespace ge
#endif // INC_EXTERNAL_GRAPH_ATTR_VALUE_H_ #endif // INC_EXTERNAL_GRAPH_ATTR_VALUE_H_

@ -61,6 +61,7 @@ using std::function;
using std::shared_ptr; using std::shared_ptr;
using std::string; using std::string;
/*lint -e148*/
class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Operator { class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Operator {
public: public:
friend class OperatorImpl; friend class OperatorImpl;
@ -88,7 +89,7 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Operator {
explicit Operator(const string &type); explicit Operator(const string &type);
Operator(const string &name, const string &type); Operator(const string &name, const string &type); // lint !e148
virtual ~Operator() = default; virtual ~Operator() = default;
@ -101,7 +102,7 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Operator {
// Only has one output index = 0 // Only has one output index = 0
Operator &SetInput(const string &dst_name, const Operator &src_oprt); Operator &SetInput(const string &dst_name, const Operator &src_oprt);
Operator &SetInput(const string &dst_name, const Operator &src_oprt, const string &name); Operator &SetInput(const string &dst_name, const Operator &src_oprt, const string &name); // lint !e148
Operator &AddControlInput(const Operator &src_oprt); Operator &AddControlInput(const Operator &src_oprt);
@ -123,22 +124,22 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Operator {
TensorDesc GetOutputDesc(uint32_t index) const; TensorDesc GetOutputDesc(uint32_t index) const;
graphStatus UpdateOutputDesc(const string &name, const TensorDesc &tensor_desc); graphStatus UpdateOutputDesc(const string &name, const TensorDesc &tensor_desc); // lint !e148
TensorDesc GetDynamicInputDesc(const string &name, uint32_t index) const; TensorDesc GetDynamicInputDesc(const string &name, uint32_t index) const;
graphStatus UpdateDynamicInputDesc(const string &name, uint32_t index, const TensorDesc &tensor_desc); graphStatus UpdateDynamicInputDesc(const string &name, uint32_t index, const TensorDesc &tensor_desc); // lint !e148
TensorDesc GetDynamicOutputDesc(const string &name, uint32_t index) const; TensorDesc GetDynamicOutputDesc(const string &name, uint32_t index) const;
graphStatus UpdateDynamicOutputDesc(const string &name, uint32_t index, const TensorDesc &tensor_desc); graphStatus UpdateDynamicOutputDesc(const string &name, uint32_t index, const TensorDesc &tensor_desc); // lint !e148
graphStatus InferShapeAndType(); graphStatus InferShapeAndType(); // lint !e148
void SetInferenceContext(const InferenceContextPtr &inference_context); void SetInferenceContext(const InferenceContextPtr &inference_context);
InferenceContextPtr GetInferenceContext() const; InferenceContextPtr GetInferenceContext() const;
graphStatus VerifyAllAttr(bool disable_common_verifier = false); graphStatus VerifyAllAttr(bool disable_common_verifier = false); // lint !e148
size_t GetInputsSize() const; size_t GetInputsSize() const;
@ -251,19 +252,20 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Operator {
void RequiredAttrRegister(const string &name); void RequiredAttrRegister(const string &name);
graphStatus VerifyAll(); graphStatus VerifyAll(); // lint !e148
// Only has one output index = 0 // Only has one output index = 0
Operator &SetInput(const string &dst_name, uint32_t dst_index, const Operator &src_oprt); Operator &SetInput(const string &dst_name, uint32_t dst_index, const Operator &src_oprt);
Operator &SetInput(const string &dst_name, uint32_t dst_index, const Operator &src_oprt, const string &name); Operator &SetInput(const string &dst_name, uint32_t dst_index, const Operator &src_oprt,
const string &name); // lint !e148
void SubgraphRegister(const string &ir_name, bool dynamic); void SubgraphRegister(const string &ir_name, bool dynamic);
void SubgraphCountRegister(const string &ir_name, uint32_t count); void SubgraphCountRegister(const string &ir_name, uint32_t count);
void SetSubgraphBuilder(const string &ir_name, uint32_t index, const SubgraphBuilder &builder); void SetSubgraphBuilder(const string &ir_name, uint32_t index, const SubgraphBuilder &builder);
private: private:
Operator &SetInput(const string &dst_name, const OutHandler &out_handler); Operator &SetInput(const string &dst_name, const OutHandler &out_handler); // lint !e148
OutHandler GetOutput(const string &name) const; OutHandler GetOutput(const string &name) const;
@ -273,6 +275,7 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Operator {
graphStatus GetInputConstDataOut(const string &dst_name, Tensor &data) const; graphStatus GetInputConstDataOut(const string &dst_name, Tensor &data) const;
}; };
/*lint +e148*/
} // namespace ge } // namespace ge
#endif // INC_EXTERNAL_GRAPH_OPERATOR_H_ #endif // INC_EXTERNAL_GRAPH_OPERATOR_H_

@ -343,6 +343,7 @@ class OpReg {
auto x_type = op.GetInputDesc(in_name).GetDataType(); \ auto x_type = op.GetInputDesc(in_name).GetDataType(); \
TensorDesc op_output_desc = op.GetOutputDesc(out_name); \ TensorDesc op_output_desc = op.GetOutputDesc(out_name); \
op_output_desc.SetShape(ge::Shape(x_shape)); \ op_output_desc.SetShape(ge::Shape(x_shape)); \
op_output_desc.SetOriginShape(ge::Shape(x_shape)); \
op_output_desc.SetDataType(x_type); \ op_output_desc.SetDataType(x_type); \
return op.UpdateOutputDesc(out_name, op_output_desc); \ return op.UpdateOutputDesc(out_name, op_output_desc); \
} }

@ -126,5 +126,6 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Tensor {
friend class TensorAdapter; friend class TensorAdapter;
}; };
} // namespace ge } // namespace ge
/*lint +e148*/
#endif // INC_EXTERNAL_GRAPH_TENSOR_H_ #endif // INC_EXTERNAL_GRAPH_TENSOR_H_

@ -145,7 +145,8 @@ enum Format {
FORMAT_FRACTAL_ZN_LSTM, FORMAT_FRACTAL_ZN_LSTM,
FORMAT_FRACTAL_Z_G, FORMAT_FRACTAL_Z_G,
FORMAT_RESERVED, FORMAT_RESERVED,
FORMAT_ALL FORMAT_ALL,
FORMAT_NULL
}; };
// for unknown shape op type // for unknown shape op type

@ -40,6 +40,7 @@ using std::to_string;
using std::unique_ptr; using std::unique_ptr;
using std::vector; using std::vector;
/*lint -e148*/
namespace ge { namespace ge {
class Operator; class Operator;
class TensorDesc; class TensorDesc;
@ -98,6 +99,8 @@ class FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY OpRegistrationData {
OpRegistrationData &DelInputWithOriginalType(int input_idx, const std::string &ori_type); OpRegistrationData &DelInputWithOriginalType(int input_idx, const std::string &ori_type);
OpRegistrationData &InputReorderVector(const vector<int> &input_order);
domi::ImplyType GetImplyType() const; domi::ImplyType GetImplyType() const;
std::string GetOmOptype() const; std::string GetOmOptype() const;
std::set<std::string> GetOriginOpTypeSet() const; std::set<std::string> GetOriginOpTypeSet() const;
@ -130,4 +133,5 @@ namespace ge {
using OpRegistrationData = domi::OpRegistrationData; using OpRegistrationData = domi::OpRegistrationData;
using OpReceiver = domi::OpReceiver; using OpReceiver = domi::OpReceiver;
} // namespace ge } // namespace ge
/*lint +e148*/
#endif // INC_EXTERNAL_REGISTER_REGISTER_H_ #endif // INC_EXTERNAL_REGISTER_REGISTER_H_

@ -51,30 +51,6 @@ inline pid_t GetTid() {
return tid; return tid;
} }
#define GE_TIMESTAMP_START(stage) uint64_t startUsec_##stage = ge::GetCurrentTimestap()
#define GE_TIMESTAMP_END(stage, stage_name) \
do { \
uint64_t endUsec_##stage = ge::GetCurrentTimestap(); \
GEEVENT("[GEPERFTRACE] The time cost of %s is [%lu] micro second.", (stage_name), \
(endUsec_##stage - startUsec_##stage)); \
} while (0);
#define GE_TIMESTAMP_CALLNUM_START(stage) \
uint64_t startUsec_##stage = ge::GetCurrentTimestap(); \
uint64_t call_num_of##stage = 0; \
uint64_t time_of##stage = 0
#define GE_TIMESTAMP_RESTART(stage) (startUsec_##stage = ge::GetCurrentTimestap())
#define GE_TIMESTAMP_ADD(stage) \
time_of##stage += ge::GetCurrentTimestap() - startUsec_##stage; \
call_num_of##stage++
#define GE_TIMESTAMP_CALLNUM_END(stage, stage_name) \
GEEVENT("[GEPERFTRACE] The time cost of %s is [%lu] micro second, call num is %lu", (stage_name), time_of##stage, \
call_num_of##stage)
#define GE_LOG_ERROR(MOD_NAME, ERROR_CODE, fmt, ...) \ #define GE_LOG_ERROR(MOD_NAME, ERROR_CODE, fmt, ...) \
dlog_error(MOD_NAME, "%lu %s: ErrorNo: %d(%s) " fmt, GetTid(), __FUNCTION__, ERROR_CODE, \ dlog_error(MOD_NAME, "%lu %s: ErrorNo: %d(%s) " fmt, GetTid(), __FUNCTION__, ERROR_CODE, \
((GE_GET_ERRORNO_STR(ERROR_CODE)).c_str()), ##__VA_ARGS__) ((GE_GET_ERRORNO_STR(ERROR_CODE)).c_str()), ##__VA_ARGS__)

@ -19,15 +19,12 @@
#include <string> #include <string>
#include "cce/cce_def.hpp" #include "runtime/rt.h"
#include "common/string_util.h" #include "common/string_util.h"
#include "common/util.h" #include "common/util.h"
#include "framework/common/debug/ge_log.h" #include "framework/common/debug/ge_log.h"
#include "ge/ge_api_error_codes.h" #include "ge/ge_api_error_codes.h"
using cce::CC_STATUS_SUCCESS;
using cce::ccStatus_t;
#if !defined(__ANDROID__) && !defined(ANDROID) #if !defined(__ANDROID__) && !defined(ANDROID)
#define DOMI_LOGE(...) GE_LOG_ERROR(GE_MODULE_NAME, ge::FAILED, __VA_ARGS__) #define DOMI_LOGE(...) GE_LOG_ERROR(GE_MODULE_NAME, ge::FAILED, __VA_ARGS__)
#else #else
@ -106,11 +103,7 @@ using cce::ccStatus_t;
do { \ do { \
bool b = (expr); \ bool b = (expr); \
if (!b) { \ if (!b) { \
std::string msg; \ GELOGE(_status, __VA_ARGS__); \
(void)msg.append(ge::StringUtils::FormatString(__VA_ARGS__)); \
(void)msg.append( \
ge::StringUtils::FormatString(" Error Code:0x%X(%s)", _status, GET_ERRORNO_STR(_status).c_str())); \
DOMI_LOGE("%s", msg.c_str()); \
return _status; \ return _status; \
} \ } \
} while (0); } while (0);
@ -132,7 +125,7 @@ using cce::ccStatus_t;
DOMI_LOGE(__VA_ARGS__); \ DOMI_LOGE(__VA_ARGS__); \
exec_expr; \ exec_expr; \
} \ } \
}; }
// If expr is not true, print the log and execute a custom statement // If expr is not true, print the log and execute a custom statement
#define GE_CHK_BOOL_EXEC_WARN(expr, exec_expr, ...) \ #define GE_CHK_BOOL_EXEC_WARN(expr, exec_expr, ...) \
@ -142,7 +135,7 @@ using cce::ccStatus_t;
GELOGW(__VA_ARGS__); \ GELOGW(__VA_ARGS__); \
exec_expr; \ exec_expr; \
} \ } \
}; }
// If expr is not true, print the log and execute a custom statement // If expr is not true, print the log and execute a custom statement
#define GE_CHK_BOOL_EXEC_INFO(expr, exec_expr, ...) \ #define GE_CHK_BOOL_EXEC_INFO(expr, exec_expr, ...) \
{ \ { \
@ -151,7 +144,7 @@ using cce::ccStatus_t;
GELOGI(__VA_ARGS__); \ GELOGI(__VA_ARGS__); \
exec_expr; \ exec_expr; \
} \ } \
}; }
// If expr is not true, print the log and execute a custom statement // If expr is not true, print the log and execute a custom statement
#define GE_CHK_BOOL_TRUE_EXEC_INFO(expr, exec_expr, ...) \ #define GE_CHK_BOOL_TRUE_EXEC_INFO(expr, exec_expr, ...) \
@ -161,7 +154,7 @@ using cce::ccStatus_t;
GELOGI(__VA_ARGS__); \ GELOGI(__VA_ARGS__); \
exec_expr; \ exec_expr; \
} \ } \
}; }
// If expr is true, print logs and execute custom statements // If expr is true, print logs and execute custom statements
#define GE_CHK_BOOL_TRUE_EXEC_WITH_LOG(expr, exec_expr, ...) \ #define GE_CHK_BOOL_TRUE_EXEC_WITH_LOG(expr, exec_expr, ...) \
@ -171,7 +164,7 @@ using cce::ccStatus_t;
DOMI_LOGE(__VA_ARGS__); \ DOMI_LOGE(__VA_ARGS__); \
exec_expr; \ exec_expr; \
} \ } \
}; }
// If expr is true, print the Information log and execute a custom statement // If expr is true, print the Information log and execute a custom statement
#define GE_CHK_TRUE_EXEC_INFO(expr, exec_expr, ...) \ #define GE_CHK_TRUE_EXEC_INFO(expr, exec_expr, ...) \
{ \ { \
@ -180,7 +173,7 @@ using cce::ccStatus_t;
GELOGI(__VA_ARGS__); \ GELOGI(__VA_ARGS__); \
exec_expr; \ exec_expr; \
} \ } \
}; }
// If expr is not SUCCESS, print the log and execute the expression + return // If expr is not SUCCESS, print the log and execute the expression + return
#define GE_CHK_BOOL_TRUE_RET_VOID(expr, exec_expr, ...) \ #define GE_CHK_BOOL_TRUE_RET_VOID(expr, exec_expr, ...) \
@ -191,7 +184,7 @@ using cce::ccStatus_t;
exec_expr; \ exec_expr; \
return; \ return; \
} \ } \
}; }
// If expr is not SUCCESS, print the log and execute the expression + return _status // If expr is not SUCCESS, print the log and execute the expression + return _status
#define GE_CHK_BOOL_TRUE_EXEC_RET_STATUS(expr, _status, exec_expr, ...) \ #define GE_CHK_BOOL_TRUE_EXEC_RET_STATUS(expr, _status, exec_expr, ...) \
@ -202,7 +195,7 @@ using cce::ccStatus_t;
exec_expr; \ exec_expr; \
return _status; \ return _status; \
} \ } \
}; }
// If expr is not true, execute a custom statement // If expr is not true, execute a custom statement
#define GE_CHK_BOOL_EXEC_NOLOG(expr, exec_expr) \ #define GE_CHK_BOOL_EXEC_NOLOG(expr, exec_expr) \
@ -211,7 +204,7 @@ using cce::ccStatus_t;
if (!b) { \ if (!b) { \
exec_expr; \ exec_expr; \
} \ } \
}; }
// -----------------runtime related macro definitions------------------------------- // -----------------runtime related macro definitions-------------------------------
// If expr is not RT_ERROR_NONE, print the log // If expr is not RT_ERROR_NONE, print the log
@ -231,7 +224,7 @@ using cce::ccStatus_t;
DOMI_LOGE("Call rt api failed, ret: 0x%X", _rt_ret); \ DOMI_LOGE("Call rt api failed, ret: 0x%X", _rt_ret); \
exec_expr; \ exec_expr; \
} \ } \
}; }
// If expr is not RT_ERROR_NONE, print the log and return // If expr is not RT_ERROR_NONE, print the log and return
#define GE_CHK_RT_RET(expr) \ #define GE_CHK_RT_RET(expr) \
@ -239,17 +232,7 @@ using cce::ccStatus_t;
rtError_t _rt_ret = (expr); \ rtError_t _rt_ret = (expr); \
if (_rt_ret != RT_ERROR_NONE) { \ if (_rt_ret != RT_ERROR_NONE) { \
DOMI_LOGE("Call rt api failed, ret: 0x%X", _rt_ret); \ DOMI_LOGE("Call rt api failed, ret: 0x%X", _rt_ret); \
return ge::RT_FAILED; \ return RT_ERROR_TO_GE_STATUS(_rt_ret); \
} \
} while (0);
// ------------------------cce related macro definitions----------------------------
// If expr is not CC_STATUS_SUCCESS, print the log
#define GE_CHK_CCE(expr) \
do { \
ccStatus_t _cc_ret = (expr); \
if (_cc_ret != CC_STATUS_SUCCESS) { \
DOMI_LOGE("Call cce api failed, ret: 0x%X", _cc_ret); \
} \ } \
} while (0); } while (0);
@ -259,7 +242,7 @@ using cce::ccStatus_t;
if (expr) { \ if (expr) { \
exec_expr; \ exec_expr; \
} \ } \
}; }
// If make_shared is abnormal, print the log and execute the statement // If make_shared is abnormal, print the log and execute the statement
#define GE_MAKE_SHARED(exec_expr0, exec_expr1) \ #define GE_MAKE_SHARED(exec_expr0, exec_expr1) \

@ -14,6 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
/*lint -e* */
#ifndef INC_FRAMEWORK_COMMON_GE_INNER_ERROR_CODES_H_ #ifndef INC_FRAMEWORK_COMMON_GE_INNER_ERROR_CODES_H_
#define INC_FRAMEWORK_COMMON_GE_INNER_ERROR_CODES_H_ #define INC_FRAMEWORK_COMMON_GE_INNER_ERROR_CODES_H_
@ -280,8 +281,24 @@ GE_ERRORNO_RUNTIME(GE_RTI_CALL_HCCL_REDUCE_SCATTER_FAILED, 47, "call hccl hcom r
// Executor module error code definition // Executor module error code definition
GE_ERRORNO_EXECUTOR(GE_EXEC_NOT_INIT, 1, "GE Executor is not yet initialized."); GE_ERRORNO_EXECUTOR(GE_EXEC_NOT_INIT, 1, "GE Executor is not yet initialized.");
GE_ERRORNO_EXECUTOR(GE_AIPP_NOT_EXIST, 2, "GE AIPP is not exist."); GE_ERRORNO_EXECUTOR(GE_EXEC_MODEL_PATH_INVALID, 2, "Model file path is invalid.");
GE_ERRORNO_EXECUTOR(GE_DYNAMIC_AIPP_NOT_SUPPORT_QUERY, 3, "GE Dynamic AIPP is not support to query temporarily."); GE_ERRORNO_EXECUTOR(GE_EXEC_MODEL_KEY_PATH_INVALID, 3, "Key file path of model is invalid.");
GE_ERRORNO_EXECUTOR(GE_EXEC_MODEL_ID_INVALID, 4, "Model id is invalid.");
GE_ERRORNO_EXECUTOR(GE_EXEC_MODEL_DATA_SIZE_INVALID, 5, "Data size of model is invalid.");
GE_ERRORNO_EXECUTOR(GE_EXEC_MODEL_PARTITION_NUM_INVALID, 6, "Partition number of model is invalid.");
GE_ERRORNO_EXECUTOR(GE_EXEC_MODEL_QUEUE_ID_INVALID, 7, "Queue id of model is invalid.");
GE_ERRORNO_EXECUTOR(GE_EXEC_MODEL_NOT_SUPPORT_ENCRYPTION, 8, "Model does not support encryption.");
GE_ERRORNO_EXECUTOR(GE_EXEC_READ_MODEL_FILE_FAILED, 9, "Failed to read model file.");
GE_ERRORNO_EXECUTOR(GE_EXEC_LOAD_MODEL_REPEATED, 10, "The model is loaded repeatedly.");
GE_ERRORNO_EXECUTOR(GE_EXEC_LOAD_MODEL_PARTITION_FAILED, 11, "Failed to load model partition.");
GE_ERRORNO_EXECUTOR(GE_EXEC_LOAD_WEIGHT_PARTITION_FAILED, 12, "Failed to load weight partition.");
GE_ERRORNO_EXECUTOR(GE_EXEC_LOAD_TASK_PARTITION_FAILED, 13, "Failed to load task partition.");
GE_ERRORNO_EXECUTOR(GE_EXEC_LOAD_KERNEL_PARTITION_FAILED, 14, "Failed to load kernel partition.");
GE_ERRORNO_EXECUTOR(GE_EXEC_ALLOC_FEATURE_MAP_MEM_FAILED, 15, "Failed to allocate feature map memory.");
GE_ERRORNO_EXECUTOR(GE_EXEC_ALLOC_WEIGHT_MEM_FAILED, 16, "Failed to allocate weight memory.");
GE_ERRORNO_EXECUTOR(GE_EXEC_ALLOC_VAR_MEM_FAILED, 17, "Failed to allocate variable memory.");
GE_ERRORNO_EXECUTOR(GE_AIPP_NOT_EXIST, 18, "GE AIPP is not exist.");
GE_ERRORNO_EXECUTOR(GE_DYNAMIC_AIPP_NOT_SUPPORT_QUERY, 19, "GE Dynamic AIPP is not support to query temporarily.");
// Generator module error code definition // Generator module error code definition
GE_ERRORNO_GENERATOR(GE_GENERATOR_GRAPH_MANAGER_INIT_FAILED, 1, "Graph manager initialize failed."); GE_ERRORNO_GENERATOR(GE_GENERATOR_GRAPH_MANAGER_INIT_FAILED, 1, "Graph manager initialize failed.");
@ -289,6 +306,8 @@ GE_ERRORNO_GENERATOR(GE_GENERATOR_GRAPH_MANAGER_ADD_GRAPH_FAILED, 2, "Graph mana
GE_ERRORNO_GENERATOR(GE_GENERATOR_GRAPH_MANAGER_BUILD_GRAPH_FAILED, 3, "Graph manager build graph failed."); GE_ERRORNO_GENERATOR(GE_GENERATOR_GRAPH_MANAGER_BUILD_GRAPH_FAILED, 3, "Graph manager build graph failed.");
GE_ERRORNO_GENERATOR(GE_GENERATOR_GRAPH_MANAGER_FINALIZE_FAILED, 4, "Graph manager finalize failed."); GE_ERRORNO_GENERATOR(GE_GENERATOR_GRAPH_MANAGER_FINALIZE_FAILED, 4, "Graph manager finalize failed.");
GE_ERRORNO_GENERATOR(GE_GENERATOR_GRAPH_MANAGER_SAVE_MODEL_FAILED, 5, "Graph manager save model failed."); GE_ERRORNO_GENERATOR(GE_GENERATOR_GRAPH_MANAGER_SAVE_MODEL_FAILED, 5, "Graph manager save model failed.");
#define RT_ERROR_TO_GE_STATUS(RT_ERROR) static_cast<Status>(RT_ERROR)
} // namespace ge } // namespace ge
#endif // INC_FRAMEWORK_COMMON_GE_INNER_ERROR_CODES_H_ #endif // INC_FRAMEWORK_COMMON_GE_INNER_ERROR_CODES_H_

@ -54,9 +54,9 @@ const char *const GE_ENGINE_ATTR_MEM_TYPE_HBM = "HBM";
struct DataBuffer { struct DataBuffer {
public: public:
void *data; // Data address void *data; // Data address
uint32_t length; // Data length uint64_t length; // Data length
bool isDataSupportMemShare = false; bool isDataSupportMemShare = false;
DataBuffer(void *dataIn, uint32_t len, bool isSupportMemShare) DataBuffer(void *dataIn, uint64_t len, bool isSupportMemShare)
: data(dataIn), length(len), isDataSupportMemShare(isSupportMemShare) {} : data(dataIn), length(len), isDataSupportMemShare(isSupportMemShare) {}
DataBuffer() : data(nullptr), length(0), isDataSupportMemShare(false) {} DataBuffer() : data(nullptr), length(0), isDataSupportMemShare(false) {}
@ -106,7 +106,7 @@ struct ShapeDescription {
// Definition of input and output description information // Definition of input and output description information
struct InputOutputDescInfo { struct InputOutputDescInfo {
std::string name; std::string name;
uint32_t size; uint64_t size;
uint32_t data_type; uint32_t data_type;
ShapeDescription shape_info; ShapeDescription shape_info;
}; };
@ -231,6 +231,7 @@ struct Options {
// Profiling info of task // Profiling info of task
struct TaskDescInfo { struct TaskDescInfo {
std::string model_name;
std::string op_name; std::string op_name;
uint32_t block_dim; uint32_t block_dim;
uint32_t task_id; uint32_t task_id;
@ -239,6 +240,7 @@ struct TaskDescInfo {
// Profiling info of graph // Profiling info of graph
struct ComputeGraphDescInfo { struct ComputeGraphDescInfo {
std::string model_name;
std::string op_name; std::string op_name;
std::string op_type; std::string op_type;
std::vector<Format> input_format; std::vector<Format> input_format;

@ -44,8 +44,6 @@ class ModelHelper {
void SetSaveMode(bool val) { is_offline_ = val; } void SetSaveMode(bool val) { is_offline_ = val; }
bool GetSaveMode(void) const { return is_offline_; } bool GetSaveMode(void) const { return is_offline_; }
static Status TransModelToGeModel(const ModelPtr& model, GeModelPtr& ge_model);
static Status TransGeModelToModel(const GeModelPtr& geModelPtr, ModelPtr& modelPtr);
Status GetBaseNameFromFileName(const std::string& file_name, std::string& base_name); Status GetBaseNameFromFileName(const std::string& file_name, std::string& base_name);
Status GetModelNameFromMergedGraphName(const std::string& graph_name, std::string& model_name); Status GetModelNameFromMergedGraphName(const std::string& graph_name, std::string& model_name);

@ -36,8 +36,8 @@ class StringUtils {
#endif #endif
return s; return s;
} }
// lint -esym(551,*)
static std::string &Rtrim(std::string &s) { static std::string &Rtrim(std::string &s) { /*lint !e618*/
#if __cplusplus >= 201103L #if __cplusplus >= 201103L
(void)s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int c) { return !std::isspace(c); })); (void)s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int c) { return !std::isspace(c); }));
#else #else
@ -45,7 +45,7 @@ class StringUtils {
#endif #endif
return s; return s;
} }
// lint -esym(551,*)
/// ///
/// @ingroup domi_common /// @ingroup domi_common
/// @brief delete spaces at the beginning and end of a string /// @brief delete spaces at the beginning and end of a string

@ -48,6 +48,9 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string DUMP_S
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string DUMP_LAYER; FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string DUMP_LAYER;
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string DUMP_FILE_PATH; FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string DUMP_FILE_PATH;
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string DUMP_MODE; FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string DUMP_MODE;
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string OP_DEBUG_AICORE;
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string OP_DEBUG_ATOMIC;
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string OP_DEBUG_ALL;
// Supported public properties name // Supported public properties name
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string PROP_OME_START_TIME; // Start time FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string PROP_OME_START_TIME; // Start time
@ -335,6 +338,8 @@ REGISTER_OPTYPE_DECLARE(BASICLSTMCELL, "BasicLSTMCell");
REGISTER_OPTYPE_DECLARE(GETNEXT, "GetNext"); REGISTER_OPTYPE_DECLARE(GETNEXT, "GetNext");
REGISTER_OPTYPE_DECLARE(INITDATA, "InitData"); REGISTER_OPTYPE_DECLARE(INITDATA, "InitData");
REGISTER_OPTYPE_DECLARE(TRANSSHAPE, "TransShape") REGISTER_OPTYPE_DECLARE(TRANSSHAPE, "TransShape")
REGISTER_OPTYPE_DECLARE(REFIDENTITY, "RefIdentity");
REGISTER_OPTYPE_DECLARE(BITCAST, "Bitcast");
// ANN dedicated operator // ANN dedicated operator
REGISTER_OPTYPE_DECLARE(ANN_MEAN, "AnnMean"); REGISTER_OPTYPE_DECLARE(ANN_MEAN, "AnnMean");
@ -428,6 +433,8 @@ REGISTER_OPTYPE_DECLARE(HCOMALLREDUCE, "HcomAllReduce");
REGISTER_OPTYPE_DECLARE(HCOMREDUCESCATTER, "HcomReduceScatter"); REGISTER_OPTYPE_DECLARE(HCOMREDUCESCATTER, "HcomReduceScatter");
REGISTER_OPTYPE_DECLARE(HCOMSEND, "HcomSend"); REGISTER_OPTYPE_DECLARE(HCOMSEND, "HcomSend");
REGISTER_OPTYPE_DECLARE(HCOMRECEIVE, "HcomReceive"); REGISTER_OPTYPE_DECLARE(HCOMRECEIVE, "HcomReceive");
REGISTER_OPTYPE_DECLARE(HCOMREMOTEREAD, "HcomRemoteRead");
REGISTER_OPTYPE_DECLARE(HCOMREMOTEWRITE, "HcomRemoteWrite");
REGISTER_OPTYPE_DECLARE(VARASSIGN, "VarAssign"); REGISTER_OPTYPE_DECLARE(VARASSIGN, "VarAssign");
REGISTER_OPTYPE_DECLARE(VARISINITIALIZEDOP, "VarIsInitializedOp"); REGISTER_OPTYPE_DECLARE(VARISINITIALIZEDOP, "VarIsInitializedOp");
@ -554,6 +561,16 @@ enum ModelCheckType {
UNCHECK // no verification UNCHECK // no verification
}; };
///
/// @brief dynamic input type
///
enum DynamicInputType {
FIXED = 0, // default mode
DYNAMIC_BATCH = 1,
DYNAMIC_IMAGE = 2,
DYNAMIC_DIMS = 3
};
/// ///
/// @brief magic number of the model file /// @brief magic number of the model file
/// ///
@ -631,6 +648,9 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string NODE_N
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string NODE_NAME_END_GRAPH; FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string NODE_NAME_END_GRAPH;
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string NODE_NAME_OP_DEBUG;
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string OP_TYPE_OP_DEBUG;
// convolution node type // convolution node type
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string OP_TYPE_CONVOLUTION; FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string OP_TYPE_CONVOLUTION;
// adds a convolutional node name for the hard AIPP // adds a convolutional node name for the hard AIPP

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

Loading…
Cancel
Save