!45 Synchronize Ascend software suite 18 Jul 2020

Merge pull request !45 from yanghaoran/master
pull/45/MERGE
mindspore-ci-bot 5 years ago committed by Gitee
commit 103f2d1019

@ -52,5 +52,16 @@ struct GETaskInfo {
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;
};
} // namespace ge
#endif // INC_COMMON_OPSKERNEL_GE_TASK_INFO_H_

@ -28,6 +28,7 @@ struct CompressConfig {
size_t channel; // channels of L2 or DDR. For load balance
size_t fractalSize; // size of compressing block
bool isTight; // whether compose compressed data tightly
size_t init_offset;
};
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

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

@ -44,8 +44,12 @@ 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_STEP = "ge.exec.dumpStep";
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_OP_DEBUG_LEVEL = "ge.exec.opDebugLevel";
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_ENABLE_SCOPE_FUSION_PASSES = "ge.exec.enableScopeFusionPasses";
// profiling flag
const char *const OPTION_EXEC_PROFILING_MODE = "ge.exec.profilingMode";
const char *const OPTION_EXEC_PROFILING_OPTIONS = "ge.exec.profilingOptions";
@ -219,6 +223,10 @@ const char *const ENABLE_SINGLE_STREAM = "ge.enableSingleStream";
// Configure input fp16 nodes
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
enum GraphRunMode { PREDICTION = 0, TRAIN };

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

@ -98,6 +98,8 @@ class FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY OpRegistrationData {
OpRegistrationData &DelInputWithOriginalType(int input_idx, const std::string &ori_type);
OpRegistrationData &InputReorderVector(const vector<int> &input_order);
domi::ImplyType GetImplyType() const;
std::string GetOmOptype() const;
std::set<std::string> GetOriginOpTypeSet() const;

@ -51,30 +51,6 @@ inline pid_t GetTid() {
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, ...) \
dlog_error(MOD_NAME, "%lu %s: ErrorNo: %d(%s) " fmt, GetTid(), __FUNCTION__, ERROR_CODE, \
((GE_GET_ERRORNO_STR(ERROR_CODE)).c_str()), ##__VA_ARGS__)

@ -19,15 +19,12 @@
#include <string>
#include "cce/cce_def.hpp"
#include "runtime/rt.h"
#include "common/string_util.h"
#include "common/util.h"
#include "framework/common/debug/ge_log.h"
#include "ge/ge_api_error_codes.h"
using cce::CC_STATUS_SUCCESS;
using cce::ccStatus_t;
#if !defined(__ANDROID__) && !defined(ANDROID)
#define DOMI_LOGE(...) GE_LOG_ERROR(GE_MODULE_NAME, ge::FAILED, __VA_ARGS__)
#else
@ -102,17 +99,13 @@ using cce::ccStatus_t;
} while (0);
// If expr is not true, print the log and return the specified status
#define GE_CHK_BOOL_RET_STATUS(expr, _status, ...) \
do { \
bool b = (expr); \
if (!b) { \
std::string msg; \
(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; \
} \
#define GE_CHK_BOOL_RET_STATUS(expr, _status, ...) \
do { \
bool b = (expr); \
if (!b) { \
GELOGE(_status, __VA_ARGS__); \
return _status; \
} \
} while (0);
// If expr is not true, print the log and return the specified status
@ -132,7 +125,7 @@ using cce::ccStatus_t;
DOMI_LOGE(__VA_ARGS__); \
exec_expr; \
} \
};
}
// If expr is not true, print the log and execute a custom statement
#define GE_CHK_BOOL_EXEC_WARN(expr, exec_expr, ...) \
@ -142,7 +135,7 @@ using cce::ccStatus_t;
GELOGW(__VA_ARGS__); \
exec_expr; \
} \
};
}
// If expr is not true, print the log and execute a custom statement
#define GE_CHK_BOOL_EXEC_INFO(expr, exec_expr, ...) \
{ \
@ -151,7 +144,7 @@ using cce::ccStatus_t;
GELOGI(__VA_ARGS__); \
exec_expr; \
} \
};
}
// If expr is not true, print the log and execute a custom statement
#define GE_CHK_BOOL_TRUE_EXEC_INFO(expr, exec_expr, ...) \
@ -161,7 +154,7 @@ using cce::ccStatus_t;
GELOGI(__VA_ARGS__); \
exec_expr; \
} \
};
}
// If expr is true, print logs and execute custom statements
#define GE_CHK_BOOL_TRUE_EXEC_WITH_LOG(expr, exec_expr, ...) \
@ -171,7 +164,7 @@ using cce::ccStatus_t;
DOMI_LOGE(__VA_ARGS__); \
exec_expr; \
} \
};
}
// If expr is true, print the Information log and execute a custom statement
#define GE_CHK_TRUE_EXEC_INFO(expr, exec_expr, ...) \
{ \
@ -180,7 +173,7 @@ using cce::ccStatus_t;
GELOGI(__VA_ARGS__); \
exec_expr; \
} \
};
}
// If expr is not SUCCESS, print the log and execute the expression + return
#define GE_CHK_BOOL_TRUE_RET_VOID(expr, exec_expr, ...) \
@ -191,7 +184,7 @@ using cce::ccStatus_t;
exec_expr; \
return; \
} \
};
}
// 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, ...) \
@ -202,7 +195,7 @@ using cce::ccStatus_t;
exec_expr; \
return _status; \
} \
};
}
// If expr is not true, execute a custom statement
#define GE_CHK_BOOL_EXEC_NOLOG(expr, exec_expr) \
@ -211,7 +204,7 @@ using cce::ccStatus_t;
if (!b) { \
exec_expr; \
} \
};
}
// -----------------runtime related macro definitions-------------------------------
// 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); \
exec_expr; \
} \
};
}
// If expr is not RT_ERROR_NONE, print the log and return
#define GE_CHK_RT_RET(expr) \
@ -243,23 +236,13 @@ using cce::ccStatus_t;
} \
} 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);
// If expr is true, execute exec_expr without printing logs
#define GE_IF_BOOL_EXEC(expr, exec_expr) \
{ \
if (expr) { \
exec_expr; \
} \
};
}
// If make_shared is abnormal, print the log and execute the statement
#define GE_MAKE_SHARED(exec_expr0, exec_expr1) \

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

@ -44,8 +44,6 @@ class ModelHelper {
void SetSaveMode(bool val) { is_offline_ = val; }
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 GetModelNameFromMergedGraphName(const std::string& graph_name, std::string& model_name);

@ -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_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 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
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string PROP_OME_START_TIME; // Start time
@ -335,6 +338,7 @@ REGISTER_OPTYPE_DECLARE(BASICLSTMCELL, "BasicLSTMCell");
REGISTER_OPTYPE_DECLARE(GETNEXT, "GetNext");
REGISTER_OPTYPE_DECLARE(INITDATA, "InitData");
REGISTER_OPTYPE_DECLARE(TRANSSHAPE, "TransShape")
REGISTER_OPTYPE_DECLARE(REFIDENTITY, "RefIdentity");
// ANN dedicated operator
REGISTER_OPTYPE_DECLARE(ANN_MEAN, "AnnMean");
@ -631,6 +635,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_OP_DEBUG;
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string OP_TYPE_OP_DEBUG;
// convolution node type
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string OP_TYPE_CONVOLUTION;
// adds a convolutional node name for the hard AIPP

@ -21,12 +21,12 @@
#include <string>
#include <vector>
#include "common/dynamic_aipp.h"
#include "common/ge_inner_error_codes.h"
#include "common/ge_types.h"
#include "common/types.h"
#include "graph/tensor.h"
#include "runtime/base.h"
#include "common/dynamic_aipp.h"
namespace ge {
class ModelListenerAdapter;
@ -62,7 +62,7 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY GeExecutor {
// Get input and output descriptor
ge::Status GetModelDescInfo(uint32_t model_id, std::vector<ge::TensorDesc> &input_desc,
std::vector<ge::TensorDesc> &output_desc);
std::vector<ge::TensorDesc> &output_desc, bool new_model_desc = false);
///
/// @ingroup ge

@ -28,16 +28,21 @@
namespace ge {
namespace model_runner {
class RuntimeModel;
using RuntimeInfo = std::tuple<uint32_t, uint32_t, void *>;
class ModelRunner {
public:
static ModelRunner &Instance();
bool LoadDavinciModel(uint32_t device_id, uint64_t session_id, uint32_t model_id,
std::shared_ptr<DavinciModel> davinci_model, std::shared_ptr<ModelListener> listener);
bool LoadModelComplete(uint32_t model_id);
const std::vector<uint32_t> &GetTaskIdList(uint32_t model_id) const;
const std::vector<uint32_t> &GetStreamIdList(uint32_t model_id) const;
const std::map<std::string, std::shared_ptr<RuntimeInfo>> &GetRuntimeInfoMap(uint32_t model_id) const;
bool UnloadModel(uint32_t model_id);
bool RunModel(uint32_t model_id, const InputData &input_data, OutputData *output_data);

File diff suppressed because it is too large Load Diff

@ -27,6 +27,7 @@
#include "graph/ge_tensor.h"
#include "graph/graph.h"
#include "graph/op_desc.h"
#include "graph/detail/attributes_holder.h"
namespace ge {
class GeGenerator {

@ -98,13 +98,14 @@ Status DumpInfershapeJson(const ge::Graph &graph, const char *json_file);
Status SetOutputNodeInfo(ge::Graph &graph, const std::string &output_type, const std::string &output_format);
Status GetOutputLeaf(ge::NodePtr node, std::vector<std::pair<ge::NodePtr, int32_t>> &output_nodes_info,
std::vector<std::string> &output_nodes_name);
Status GetOutputLeaf(ge::NodePtr node, std::vector<std::pair<ge::NodePtr, int32_t>> &output_nodes_info);
void GetOutputNodesNameAndIndex(std::vector<std::pair<ge::NodePtr, int32_t>> &output_nodes_info,
std::vector<std::string> &output_nodes_name);
void UpdateOmgCtxWithParserCtx();
void UpdateParserCtxWithOmgCtx();
} // namespace ge
namespace domi {

@ -94,6 +94,8 @@ struct OmgContext {
std::vector<std::pair<std::string, int32_t>> user_out_nodes;
// net out nodes (where user_out_nodes or leaf nodes)
std::vector<std::string> net_out_nodes;
// net out nodes top names(only caffe has top)
std::vector<std::string> out_top_names;
// path for the aicpu custom operator so_file
std::vector<std::string> aicpu_op_run_paths;
// ddk version

@ -74,6 +74,9 @@ class ComputeGraph : public std::enable_shared_from_this<ComputeGraph>, public A
size_t GetAllNodesSize() const;
Vistor<NodePtr> GetAllNodes() const;
// is_unknown_shape: false, same with GetAllNodes func
// is_unknown_shape: true, same with GetDirectNodes func
Vistor<NodePtr> GetNodes(bool is_unknown_shape) const;
size_t GetDirectNodesSize() const;
Vistor<NodePtr> GetDirectNode() const;
Vistor<NodePtr> GetInputNodes() const;
@ -174,6 +177,10 @@ class ComputeGraph : public std::enable_shared_from_this<ComputeGraph>, public A
void SetInputSize(uint32_t size) { input_size_ = size; }
uint32_t GetInputSize() const { return input_size_; }
// false: known shape true: unknow shape
bool GetGraphUnknownFlag() const { return is_unknown_shape_graph_; }
void SetGraphUnknownFlag(bool flag) { is_unknown_shape_graph_ = flag; }
///
/// Set is need train iteration.
/// If set true, it means this graph need to be run iteration some
@ -282,7 +289,8 @@ class ComputeGraph : public std::enable_shared_from_this<ComputeGraph>, public A
std::map<uint32_t, std::string> op_name_map_;
uint64_t session_id_ = 0;
ge::Format data_format_ = ge::FORMAT_ND;
// unknown graph indicator, default is false, mean known shape
bool is_unknown_shape_graph_ = false;
};
} // namespace ge
#endif // INC_GRAPH_COMPUTE_GRAPH_H_

@ -139,6 +139,8 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string NEW_AIPP
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_AIPP_INPUTS;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_AIPP_OUTPUTS;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_INPUT_DIMS;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_SESSION_GRAPH_ID;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_PARENT_GRAPH_NAME;
@ -776,6 +778,10 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_MOD
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_MODEL_CORE_TYPE;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_MODEL_ATC_VERSION;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_MODEL_OPP_VERSION;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string QUANTIZE_SCALE_MODE;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string QUANTIZE_SCALE_VALUE;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string QUANTIZE_SCALE_OFFSET;
@ -994,7 +1000,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAM
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_DATA_DUMP_ORIGIN_FORMAT;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_DATA_DUMP_ORIGIN_DATA_TYPE;
// used for l1 fusion and other fusion in future
// used for lX fusion
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_L1_FUSION_GROUP_ID;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_L1_FUSION_GROUP_KEY;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_FUSION_GROUP_KEY;
@ -1008,9 +1014,17 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAM
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_SWITCH_FOR_L1_FUSION;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_N_BATCH_SPILT;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NO_TASK_AND_DUMP_NEEDED;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_DATA_DUMP_REF;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_OUTPUT_OFFSET_FOR_BUFFER_FUSION;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_L2_FUSION_GROUP_ID;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_SWITCH_FOR_L2_FUSION;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_OP_INPUT_L1_FLAG;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_OP_INPUT_L1_ADDR;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_OP_INPUT_L1_VALID_SIZE;
// op overflow dump
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_OP_DEBUG_FLAG;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_OP_DEBUG_MODE;
// functional ops attr
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_IF_THEN_BRANCH;
@ -1056,6 +1070,13 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_HOR
// for gradient group
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_HCCL_FUSED_GROUP;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_HCCL_FUSED_FLAG;
// dynamic shape attrs
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_DYNAMIC_SHAPE_FIXED_ADDR;
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_DYNAMIC_SHAPE_FIXED_ADDR_INDEX;
// for fusion op plugin
GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_NAME_FUSIONOP_ORIGINAL_TYPE;
} // namespace ge
#endif // INC_GRAPH_DEBUG_GE_ATTR_DEFINE_H_

@ -149,5 +149,4 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY AttrHolder {
AnyMap extAttrs_;
};
} // namespace ge
#endif // INC_GRAPH_DETAIL_ATTRIBUTES_HOLDER_H_

@ -28,6 +28,7 @@ class GEContext {
uint32_t DeviceId();
uint64_t TraceId();
void Init();
void SetSessionId(uint64_t session_id);
void SetCtxDeviceId(uint32_t device_id);
private:

@ -25,6 +25,7 @@
#include "graph/buffer.h"
#include "graph/ge_error_codes.h"
#include "graph/types.h"
namespace ge {
class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY GeShape {
public:
@ -108,8 +109,11 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY GeTensorDesc : public AttrH
DataType GetDataType() const;
void SetDataType(DataType dt);
void SetOriginDataType(DataType originDataType);
DataType GetOriginDataType() const;
void SetOriginDataType(DataType originDataType);
std::vector<uint32_t> GetRefPortIndex() const;
void SetRefPortByIndex(const std::vector<uint32_t> &index);
GeTensorDesc Clone() const;
GeTensorDesc &operator=(const GeTensorDesc &desc);
@ -186,5 +190,4 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY GeTensor {
GeTensorDesc &DescReference() const;
};
} // namespace ge
#endif // INC_GRAPH_GE_TENSOR_H_

@ -49,5 +49,4 @@ class ModelSerialize {
friend class GraphDebugImp;
};
} // namespace ge
#endif // INC_GRAPH_MODEL_SERIALIZE_H_

@ -105,6 +105,8 @@ class OpDesc : public std::enable_shared_from_this<OpDesc>, public AttrHolder {
GeTensorDescPtr MutableInputDesc(uint32_t index) const;
GeTensorDescPtr MutableInputDesc(const string &name) const;
Vistor<GeTensorDesc> GetAllInputsDesc() const;
Vistor<GeTensorDescPtr> GetAllInputsDescPtr() const;
@ -127,6 +129,8 @@ class OpDesc : public std::enable_shared_from_this<OpDesc>, public AttrHolder {
GeTensorDescPtr MutableOutputDesc(uint32_t index) const;
GeTensorDescPtr MutableOutputDesc(const string &name) const;
uint32_t GetAllOutputsDescSize() const;
Vistor<GeTensorDesc> GetAllOutputsDesc() const;

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

Loading…
Cancel
Save