@@ -161,6 +161,17 @@ ACL_FUNC_VISIBILITY uint32_t aclrtGetThreadIdFromExceptionInfo(const aclrtExcept | |||
*/ | |||
ACL_FUNC_VISIBILITY uint32_t aclrtGetDeviceIdFromExceptionInfo(const aclrtExceptionInfo *info); | |||
/** | |||
* @ingroup AscendCL | |||
* @brief Get error code from exception information | |||
* | |||
* @param info [IN] pointer of exception information | |||
* | |||
* @retval The error code from exception information | |||
* @retval 0xFFFFFFFF if info is null | |||
*/ | |||
ACL_FUNC_VISIBILITY uint32_t aclrtGetErrorCodeFromExceptionInfo(const aclrtExceptionInfo *info); | |||
/** | |||
* @ingroup AscendCL | |||
* @brief The thread that handles the callback function on the Stream | |||
@@ -65,6 +65,7 @@ static const int32_t ACL_ERROR_RT_QUEUE_FULL = 207014; // queue is ful | |||
static const int32_t ACL_ERROR_RT_REPEATED_INIT = 207015; // repeated init | |||
static const int32_t ACL_ERROR_RT_AIVEC_OVER_FLOW = 207016; // aivec over flow | |||
static const int32_t ACL_ERROR_RT_OVER_FLOW = 207017; // common over flow | |||
static const int32_t ACL_ERROR_RT_DEVIDE_OOM = 207018; // device oom | |||
static const int32_t ACL_ERROR_RT_INTERNAL_ERROR = 507000; // runtime internal error | |||
static const int32_t ACL_ERROR_RT_TS_ERROR = 507001; // ts internel error | |||
@@ -191,6 +191,8 @@ class GE_FUNC_VISIBILITY Session { | |||
bool IsGraphNeedRebuild(uint32_t graph_id); | |||
uint64_t GetSessionId() const; | |||
private: | |||
uint64_t sessionId_; | |||
}; | |||
@@ -326,6 +326,10 @@ const char_t *const OP_COMPILER_CACHE_DIR = "ge.op_compiler_cache_dir"; | |||
// Its value should be "disable", "enable" or "force", default value is "disable" | |||
const char_t *const OP_COMPILER_CACHE_MODE = "ge.op_compiler_cache_mode"; | |||
// Configure build model type. FE need this option to judge inner model or not | |||
// Its value should be "true" or "false" | |||
const char_t *const BUILD_INNER_MODEL = "ge.build_inner_model"; | |||
// Configure whether to use single stream. | |||
// Its value should be "true" or "false", default value is "false" | |||
const char_t *const ENABLE_SINGLE_STREAM = "ge.enableSingleStream"; | |||
@@ -375,6 +379,17 @@ const std::string OP_EXECUTE_TIMEOUT = "ge.exec.opExecuteTimeout"; | |||
const char_t *const FILE_CONSTANT_PATH = "ge.exec.value_bins"; | |||
const char_t *const ENABLE_GRAPH_PARALLEL = "ge.enableGraphParallel"; | |||
const char_t *const RESOURCE_CONFIG_PATH = "ge.resourceConfigPath"; | |||
const std::string RECOMPUTE = "ge.recompute"; | |||
const char_t *const GRAPH_PARALLEL_OPTION_PATH = "ge.graphParallelOptionPath"; | |||
// 1: Complete graph resource evaluation(Inclusion graph fusion optimization) | |||
// 2: Simplified graph resource evaluation(No graph fusion optimization) | |||
const char_t *const EVALUATE_GRAPH_RESOURCE_MODE = "ge.evaluateGraphResourceMode"; | |||
// Graph run mode | |||
enum GraphRunMode { PREDICTION = 0, TRAIN }; | |||
@@ -450,6 +465,7 @@ static const char_t *const OPTYPELIST_FOR_IMPLMODE = ge::OPTYPELIST_FOR_IMPLMODE | |||
static const char_t *const DEBUG_DIR = ge::DEBUG_DIR; | |||
static const char_t *const OP_COMPILER_CACHE_DIR = ge::OP_COMPILER_CACHE_DIR; | |||
static const char_t *const OP_COMPILER_CACHE_MODE = ge::OP_COMPILER_CACHE_MODE; | |||
static const char_t *const BUILD_INNER_MODEL = ge::BUILD_INNER_MODEL; | |||
static const char_t *const MDL_BANK_PATH = ge::MDL_BANK_PATH_FLAG.c_str(); | |||
static const char_t *const OP_BANK_PATH = ge::OP_BANK_PATH_FLAG.c_str(); | |||
static const char_t *const OP_BANK_UPDATE = ge::OP_BANK_UPDATE_FLAG.c_str(); | |||
@@ -490,7 +506,9 @@ const std::set<std::string> ir_builder_suppported_options = {INPUT_FORMAT, | |||
PERFORMANCE_MODE, | |||
SHAPE_GENERALIZED_BUILD_MODE, | |||
MODIFY_MIXLIST, | |||
CUSTOMIZE_DTYPES}; | |||
CUSTOMIZE_DTYPES, | |||
BUILD_INNER_MODEL, | |||
EVALUATE_GRAPH_RESOURCE_MODE}; | |||
// for interface: aclgrphParse | |||
const std::set<std::string> ir_parser_suppported_options = { | |||
@@ -81,7 +81,8 @@ extern HcclResult HcclAllReduce(void *sendBuf, void *recvBuf, uint64_t count, Hc | |||
* | |||
* @param buf A pointer identifying the data address of the operator. | |||
* @param count An integer(u64) identifying the number of the data. | |||
* @param dataType The data type of the operator, must be one of the following types: int8, int32, float16, float32. | |||
* @param dataType The data type of the operator, must be one of the following types: int8, int16, int32, int64, | |||
uint8, uint16, uint32, uint64, float16, float32, float64. | |||
* @param root An integer(u32) identifying the the root rank in the operator. | |||
* @param comm A pointer identifying the communication resource based on | |||
* @param stream A pointer identifying the stream information. | |||
@@ -111,7 +112,8 @@ extern HcclResult HcclReduceScatter(void *sendBuf, void *recvBuf, uint64_t recvC | |||
* @param sendBuf A pointer identifying the input data address of the operator. | |||
* @param recvBuf A pointer identifying the output data address of the operator. | |||
* @param sendCount An integer(u64) identifying the number of the input data. | |||
* @param dataType The data type of the operator, must be one of the following types: int8, int32, float16, float32. | |||
* @param dataType The data type of the operator, must be one of the following types: int8, int16, int32, int64, | |||
uint8, uint16, uint32, uint64, float16, float32, float64. | |||
* @param comm A pointer identifying the communication resource based on. | |||
* @param stream A pointer identifying the stream information. | |||
* @return HcclResult | |||
@@ -149,7 +151,8 @@ extern HcclResult HcclBarrier(HcclComm comm, aclrtStream stream); | |||
* | |||
* @param sendBuff A pointer identifying the input data address of the operator. | |||
* @param count An integer(u64) identifying the number of the send data. | |||
* @param dataType The data type of the operator, must be one of the following types: int8, int32, float16, float32. | |||
* @param dataType The data type of the operator, must be one of the following types: int8, int16, int32, int64, | |||
uint8, uint16, uint32, uint64, float16, float32, float64. | |||
* @param destRank An integer identifying the destination rank. | |||
* @param comm A pointer identifying the communication resource based on. | |||
* @param stream A pointer identifying the stream information. | |||
@@ -162,7 +165,8 @@ extern HcclResult HcclSend(void *sendBuf, uint64_t count, HcclDataType dataType, | |||
* | |||
* @param recvBuff A pointer identifying the output data address of the operator. | |||
* @param count An integer(u64) identifying the number of the receive data. | |||
* @param dataType The data type of the operator, must be one of the following types: int8, int32, float16, float32. | |||
* @param dataType The data type of the operator, must be one of the following types: int8, int16, int32, int64, | |||
uint8, uint16, uint32, uint64, float16, float32, float64. | |||
* @param srcRank An integer identifying the source rank. | |||
* @param comm A pointer identifying the communication resource based on. | |||
* @param stream A pointer identifying the stream information. | |||
@@ -177,15 +181,15 @@ extern HcclResult HcclRecv(void *recvBuf, uint64_t count, HcclDataType dataType, | |||
* @param sendBuff A pointer identifying the input data address of the operator. | |||
* @param sendCounts Integer array, where entry i specifies the number of elements to send to rank i. | |||
* @param sdispls Integer array, where entry i specifies the displacement (offset from sendbuf, in units of sendtype) | |||
* from which to send data to rank i. | |||
* @param sendType Datatype of send buffer elements, must be one of the following types: int8, int32, int64, uint64, | |||
* float16, float32. | |||
from which to send data to rank i. | |||
* @param sendType Datatype of send buffer elements, must be one of the following types: int8, int16, int32, int64, | |||
uint8, uint16, uint32, uint64, float16, float32, float64. | |||
* @param recvBuf A pointer identifying the output data address of the operator. | |||
* @param recvCounts Integer array, where entry j specifies the number of elements to receive from rank j. | |||
* @param rdispls Integer array, where entry j specifies the displacement (offset from recvbuf, in units of recvtype) to | |||
* which data from rank j should be written. | |||
* @param recvType Datatype of receive buffer elements, must be one of the following types: int8, int32, int64, uint64, | |||
* float16, float32. | |||
which data from rank j should be written. | |||
* @param recvType Datatype of receive buffer elements, must be one of the following types: int8, int16, int32, int64, | |||
uint8, uint16, uint32, uint64, float16, float32, float64. | |||
* @param comm A pointer identifying the communication resource based on. | |||
* @param stream A pointer identifying the stream information. | |||
* @return HcclResult | |||
@@ -195,6 +199,23 @@ extern HcclResult HcclAlltoAllV(const void *sendBuf, const void *sendCounts, con | |||
const void *recvBuf, const void *recvCounts, const void *rdispls, HcclDataType recvType, | |||
HcclComm comm, aclrtStream stream); | |||
/** | |||
* @brief Reduce operator. | |||
* | |||
* @param sendBuf A pointer identifying the input data address of the operator. | |||
* @param recvBuf A pointer identifying the output data address of the operator. | |||
* @param count An integer(u64) identifying the number of the output data. | |||
* @param dataType The data type of the operator, must be one of the following types: int8, int16, int32, float16, | |||
* float32. | |||
* @param op The reduction type of the operator, must be one of the following types: sum, min, max, prod. | |||
* @param root An integer(u32) identifying the the root rank in the operator. | |||
* @param comm A pointer identifying the communication resource based on. | |||
* @param stream A pointer identifying the stream information. | |||
* @return HcclResult | |||
*/ | |||
extern HcclResult HcclReduce(void *sendBuf, void *recvBuf, uint64_t count, HcclDataType dataType, HcclReduceOp op, | |||
uint32_t root, HcclComm comm, aclrtStream stream); | |||
/** | |||
* @brief Destroy HCCL comm | |||
* | |||
@@ -84,6 +84,10 @@ typedef enum { | |||
HCCL_DATA_TYPE_FP32 = 4, /**< fp32 */ | |||
HCCL_DATA_TYPE_INT64 = 5, /**< int64 */ | |||
HCCL_DATA_TYPE_UINT64 = 6, /**< uint64 */ | |||
HCCL_DATA_TYPE_UINT8 = 7, /**< uint8 */ | |||
HCCL_DATA_TYPE_UINT16 = 8, /**< uint16 */ | |||
HCCL_DATA_TYPE_UINT32 = 9, /**< uint32 */ | |||
HCCL_DATA_TYPE_FP64 = 10, /**< fp64 */ | |||
HCCL_DATA_TYPE_RESERVED /**< reserved */ | |||
} HcclDataType; | |||
@@ -65,6 +65,7 @@ static const int32_t ACL_ERROR_RT_QUEUE_FULL = 207014; // queue is ful | |||
static const int32_t ACL_ERROR_RT_REPEATED_INIT = 207015; // repeated init | |||
static const int32_t ACL_ERROR_RT_AIVEC_OVER_FLOW = 207016; // aivec over flow | |||
static const int32_t ACL_ERROR_RT_OVER_FLOW = 207017; // common over flow | |||
static const int32_t ACL_ERROR_RT_DEVIDE_OOM = 207018; // device oom | |||
static const int32_t ACL_ERROR_RT_INTERNAL_ERROR = 507000; // runtime internal error | |||
static const int32_t ACL_ERROR_RT_TS_ERROR = 507001; // ts internel error | |||
@@ -85,9 +85,10 @@ inline bool IsLogEnable(const int32_t module_name, const int32_t log_level) { | |||
} \ | |||
} while (false) | |||
#define GEEVENT(fmt, ...) \ | |||
do { \ | |||
dlog_event(GE_MODULE_NAME, "%" PRIu64 " %s:" fmt, GeLog::GetTid(), &__FUNCTION__[0], ##__VA_ARGS__); \ | |||
#define GEEVENT(fmt, ...) \ | |||
do { \ | |||
dlog_event((RUN_LOG_MASK | GE_MODULE_NAME), "%" PRIu64 " %s:" fmt, GeLog::GetTid(), &__FUNCTION__[0], \ | |||
##__VA_ARGS__); \ | |||
} while (false) | |||
#define GELOGT(VALUE, fmt, ...) \ | |||
@@ -46,7 +46,7 @@ | |||
#define DECLARE_ERRORNO_OME(name, value) DECLARE_ERRORNO(SYSID_FWK, MODID_OME, name, value) | |||
#define DECLARE_ERRORNO_CALIBRATION(name, value) DECLARE_ERRORNO(SYSID_FWK, MODID_CALIBRATION, name, value) | |||
#define DEF_ERRORNO(name, desc) const ErrorNoRegisterar g_##name##_errorno((name), (desc)); | |||
#define DEF_ERRORNO(name, desc) const bool g_##name##_errorno = StatusFactory::Instance()->RegisterErrorNo(name, desc) | |||
// Interface for Obtaining Error Code Description | |||
#define GET_ERRORNO_STR(value) domi::StatusFactory::Instance()->GetErrDesc(value) | |||
@@ -60,7 +60,7 @@ class GE_FUNC_VISIBILITY StatusFactory { | |||
public: | |||
static StatusFactory *Instance(); | |||
void RegisterErrorNo(const uint32_t err, const std::string &desc); | |||
bool RegisterErrorNo(const uint32_t err, const std::string &desc); | |||
std::string GetErrDesc(const uint32_t err); | |||
@@ -72,14 +72,6 @@ class GE_FUNC_VISIBILITY StatusFactory { | |||
std::map<uint32_t, std::string> err_desc_; | |||
}; | |||
class GE_FUNC_VISIBILITY ErrorNoRegisterar { | |||
public: | |||
ErrorNoRegisterar(const uint32_t err, const std::string &desc) { | |||
StatusFactory::Instance()->RegisterErrorNo(err, desc); | |||
} | |||
~ErrorNoRegisterar() {} | |||
}; | |||
// Common errocode | |||
DECLARE_ERRORNO_COMMON(MEMALLOC_FAILED, 0); // 50331648 | |||
DECLARE_ERRORNO_COMMON(CCE_FAILED, 2); // 50331650 | |||
@@ -83,6 +83,7 @@ const std::string kAtomicOpType = "DynamicAtomicAddrClean"; | |||
const std::string kShapeTypeStatic = "static"; | |||
const std::string kShapeTypeDynamic = "dynamic"; | |||
const std::string kAtomicPrefix = "_atomic"; | |||
constexpr uint64_t kInferSessionId = 0U; | |||
constexpr uint64_t kReleaseFlag = 1U; | |||
@@ -369,7 +370,16 @@ struct DumpConfig { | |||
std::string dump_status; | |||
std::string dump_op_switch; | |||
std::string dump_debug; | |||
std::string dump_step; | |||
std::vector<ModelDumpConfig> dump_list; | |||
}; | |||
struct ModelQueueParam { | |||
uint32_t group_total_count{1}; | |||
uint32_t group_index{0U}; | |||
uint32_t group_policy{0U}; | |||
std::vector<uint32_t> input_queues; | |||
std::vector<uint32_t> output_queues; | |||
}; | |||
} // namespace ge | |||
#endif // INC_FRAMEWORK_COMMON_GE_TYPES_H_ |
@@ -0,0 +1,28 @@ | |||
/** | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2022. All rights reserved. | |||
* | |||
* 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 AIR_CXX_INC_FRAMEWORK_COMMON_GE_VISIBILITY_H_ | |||
#define AIR_CXX_INC_FRAMEWORK_COMMON_GE_VISIBILITY_H_ | |||
#if defined(_MSC_VER) | |||
#define VISIBILITY_EXPORT _declspec(dllexport) | |||
#define VISIBILITY_HIDDEN _declspec(dllimport) | |||
#else | |||
#define VISIBILITY_EXPORT __attribute__((visibility("default"))) | |||
#define VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) | |||
#endif | |||
#endif // AIR_CXX_INC_FRAMEWORK_COMMON_GE_VISIBILITY_H_ |
@@ -68,7 +68,7 @@ class GE_FUNC_VISIBILITY ModelHelper { | |||
bool IsPartitionedGraph(const GeModelPtr &cur_model) const; | |||
Status GenerateGeModel(const OmFileLoadHelper &om_load_helper, GeModelPtr &cur_model, const size_t mode_index, | |||
const bool is_dyn_root); | |||
const bool is_dyn_root) const; | |||
Status GenerateGeRootModel(const OmFileLoadHelper &om_load_helper); | |||
Status LoadModelData(const OmFileLoadHelper &om_load_helper, const GeModelPtr &cur_model, | |||
@@ -20,7 +20,7 @@ | |||
#include <memory> | |||
#include <vector> | |||
#include "framework/common/op/attr_value_util.h" | |||
#include "graph/debug/ge_attr_define.h" | |||
#include "framework/common/util.h" | |||
#include "graph/attr_value.h" | |||
#include "graph/ge_tensor.h" | |||
@@ -87,6 +87,8 @@ REGISTER_OPTYPE_DECLARE(DROPOUTDOMASK, "DropOutDoMask"); | |||
REGISTER_OPTYPE_DECLARE(DROPOUTDOMASKV3, "DropOutDoMaskV3"); | |||
REGISTER_OPTYPE_DECLARE(DROPOUTDOMASKV3D, "DropOutDoMaskV3D"); | |||
REGISTER_OPTYPE_DECLARE(SOFTMAXV2WITHDROPOUTDOMASKV3D, "SoftmaxV2WithDropOutDoMaskV3D"); | |||
REGISTER_OPTYPE_DECLARE(ATTENTIONSCORE, "AttentionScore"); | |||
REGISTER_OPTYPE_DECLARE(ATTENTIONSCOREGRAD, "AttentionScoreGrad"); | |||
REGISTER_OPTYPE_DECLARE(DROPOUTGENMASK, "DropOutGenMask"); | |||
REGISTER_OPTYPE_DECLARE(AXPYWITHSOFTMAXANDDROPOUTDOMASK, "AxpyWithSoftmaxAndDropOutDoMask"); | |||
REGISTER_OPTYPE_DECLARE(CONCAT, "Concat"); | |||
@@ -587,9 +589,6 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const std::string OP_CON | |||
// dim default size value | |||
constexpr int32_t DIM_DEFAULT_SIZE = 4; | |||
// dim extension default value | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const int32_t DIM_DEFAULT_VALUE; | |||
// default NCHW index | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const uint32_t NCHW_DIM_N; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const uint32_t NCHW_DIM_C; | |||
@@ -21,13 +21,11 @@ | |||
#include <sstream> | |||
#include <string> | |||
#include <google/protobuf/text_format.h> | |||
#include "external/graph/types.h" | |||
#include "external/register/register.h" | |||
#include "framework/common/debug/log.h" | |||
#include "framework/common/scope_guard.h" | |||
#include "framework/common/ge_inner_error_codes.h" | |||
#include "graph/detail/attributes_holder.h" | |||
#define GE_CHECK_POSITIVE_SIZE_RANGE(size) \ | |||
do { \ | |||
@@ -247,67 +245,6 @@ GE_FUNC_VISIBILITY std::string ToString(const std::vector<T> &v) { | |||
return ss.str(); | |||
} | |||
/// | |||
/// @ingroup domi_common | |||
/// @brief Converts RepeatedField to String. | |||
/// @param [in] rpd_field RepeatedField | |||
/// @return string | |||
/// | |||
template <typename T> | |||
GE_FUNC_VISIBILITY std::string ToString(const google::protobuf::RepeatedField<T> &rpd_field) { | |||
std::stringstream ss; | |||
ss << "["; | |||
for (const T x : rpd_field) { | |||
ss << x; | |||
ss << ", "; | |||
} | |||
// Delete the two extra characters at the end of the line. | |||
std::string str = ss.str().substr(0U, ss.str().length() - 2U); | |||
str += "]"; | |||
return str; | |||
} | |||
/// | |||
/// @ingroup ge_ir_utils | |||
/// @brief RepeatedPtrField->String | |||
/// @param [in] const rpd_field RepeatedPtrField | |||
/// @return String | |||
/// | |||
template <typename T> | |||
GE_FUNC_VISIBILITY std::string ToString(const google::protobuf::RepeatedPtrField<T> &rpd_ptr_field) { | |||
std::stringstream ss; | |||
ss << "["; | |||
for (const T &x : rpd_ptr_field) { | |||
ss << x; | |||
ss << ", "; | |||
} | |||
std::string str_ret = ss.str().substr(0U, ss.str().length() - 2U); | |||
str_ret += "]"; | |||
return str_ret; | |||
} | |||
/// | |||
/// @ingroup domi_common | |||
/// @brief Reads the proto structure from an array. | |||
/// @param [in] data proto data to be read | |||
/// @param [in] size proto data size | |||
/// @param [out] proto Memory for storing the proto file | |||
/// @return true success | |||
/// @return false fail | |||
/// | |||
GE_FUNC_VISIBILITY bool ReadProtoFromArray(const void *const data, const int32_t size, | |||
google::protobuf::Message *const proto); | |||
/// | |||
/// @ingroup domi_proto | |||
/// @brief Reads the proto file in the text format. | |||
/// @param [in] file path of proto file | |||
/// @param [out] message Memory for storing the proto file | |||
/// @return true success | |||
/// @return false fail | |||
/// | |||
GE_FUNC_VISIBILITY bool ReadProtoFromText(const char_t *const file, google::protobuf::Message *const message); | |||
/// | |||
/// @ingroup: domi_common | |||
/// @brief: get length of file | |||
@@ -359,15 +296,6 @@ GE_FUNC_VISIBILITY uint64_t GetCurrentTimestamp(); | |||
/// | |||
GE_FUNC_VISIBILITY uint32_t GetCurrentSecondTimestap(); | |||
/// | |||
/// @ingroup domi_common | |||
/// @brief Check whether the product of two int64 numbers exceeds the int64 range. | |||
/// @param [in] a | |||
/// @param [in] b | |||
/// @return false: true: The result is within the normal int64 range. | |||
/// | |||
GE_FUNC_VISIBILITY bool CheckInt64MulOverflow(const int64_t a, const int64_t b); | |||
/// | |||
/// @ingroup domi_common | |||
/// @brief Absolute path for obtaining files. | |||
@@ -229,15 +229,14 @@ class GE_FUNC_VISIBILITY GeExecutor { | |||
/// | |||
/// @ingroup ge | |||
/// @brief Load task list from ModelData with queue. | |||
/// @brief Load task list from GeRootModel with queue and param. | |||
/// @param [out] model_id: model id allocate from manager. | |||
/// @param [in] root_model: Instance of GeRootModel. | |||
/// @param [in] input_queue_ids: input queue ids create from user. | |||
/// @param [in] output_queue_ids: input queue ids create from user. | |||
/// @param [in] model_queue_param: params and queue ids and create from user. | |||
/// @return: 0 for success / others for fail | |||
/// | |||
Status LoadModelWithQ(uint32_t &model_id, const std::shared_ptr<GeRootModel> &root_model, | |||
const std::vector<uint32_t> &input_queue_ids, const std::vector<uint32_t> &output_queue_ids); | |||
const ModelQueueParam &model_queue_param); | |||
/// | |||
/// @ingroup ge | |||
@@ -324,6 +323,8 @@ class GE_FUNC_VISIBILITY GeExecutor { | |||
static Status ReleaseSingleOpResource(void *const stream); | |||
static Status ClearCustomAicpuSo(); | |||
static Status GetDeviceIdByModelId(const uint32_t model_id, uint32_t &device_id); | |||
Status GetBatchInfoSize(const uint32_t model_id, size_t &shape_count); | |||
@@ -27,8 +27,8 @@ | |||
#include "graph/ge_tensor.h" | |||
#include "graph/graph.h" | |||
#include "graph/op_desc.h" | |||
#include "graph/detail/attributes_holder.h" | |||
#include "framework/omg/omg_inner_types.h" | |||
#include "graph/detail/attributes_holder.h" | |||
namespace ge { | |||
const std::string kAttrSupportDynamicShape = "support_dynamicshape"; | |||
@@ -64,5 +64,14 @@ GE_FUNC_VISIBILITY Status MallocSharedMemory(const TensorInfo &tensor_info, uint | |||
/// \param var_size [out] var_size memory_size of host variable. | |||
/// \return Status result of function | |||
GE_FUNC_VISIBILITY Status GetVarBaseAddrAndSize(const std::string &var_name, uint64_t &base_addr, uint64_t &var_size); | |||
/* | |||
* @brief | |||
* @param [in] session_id | |||
* @param [out] var_size:session variables mem size | |||
* @param [out] graphs_mem_info: graphs mem info, include key:graph_id; value: {feature_map_size, const_size} | |||
*/ | |||
GE_FUNC_VISIBILITY Status GetSessionMemInfo(const uint64_t session_id, uint64_t &var_size, | |||
std::map<uint32_t, std::vector<uint64_t>> &graphs_mem_info); | |||
} // namespace ge | |||
#endif // INC_FRAMEWORK_MEMORY_MEMORY_API_H_ |
@@ -30,8 +30,6 @@ | |||
#include "graph/utils/op_desc_utils.h" | |||
#include "graph/utils/tensor_utils.h" | |||
using Status = domi::Status; | |||
namespace domi { | |||
using GetGraphCallback = std::function<std::unique_ptr<google::protobuf::Message>( | |||
const google::protobuf::Message *root_proto, const std::string &graph)>; | |||
@@ -24,7 +24,6 @@ | |||
#include "graph/utils/op_desc_utils.h" | |||
using google::protobuf::Message; | |||
using Status = domi::Status; | |||
namespace ge { | |||
/** | |||
@@ -21,6 +21,7 @@ | |||
#include <string> | |||
#include "register/register_types.h" | |||
#include "graph/types.h" | |||
#if !defined(__ANDROID__) && !defined(ANDROID) | |||
#ifndef DOMI_DYNAMIC_CAST | |||
@@ -40,427 +41,428 @@ | |||
namespace ge { | |||
namespace parser { | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DATA; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *AIPPDATA; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CONVOLUTION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CORRELATION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CORRELATIONV2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DECONVOLUTION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *POOLING; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ELTWISE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RELU; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RELU6; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SIGMOID; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ABSVAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *TANH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *PRELU; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *BATCHNORM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FUSIONBATCHNORM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SCALE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FULL_CONNECTION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SOFTMAX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *PLUS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ACTIVATION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FLATTEN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ADD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SUB; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *MUL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *MATMUL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RSQRT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *BIASADD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RESHAPE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REFORMAT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DEPCONVOLUTION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DROPOUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DROPOUTGENMASK; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DROPOUTDOMASK; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CONCAT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ROIPOOLING; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *PROPOSAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FSRDETECTIONOUTPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DETECTIONPOSTPROCESS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LRN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *TRANSDATA; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *PERMUTE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SSDNORMALIZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SSDPRIORBOX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *NETOUTPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SSDDETECTIONOUTPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REFINEDETDETECTIONOUTPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CHANNELAXPY; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *PSROIPOOLING; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *POWER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *POW; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ROIALIGN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *PYTHON; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FREESPACEEXTRACT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SPATIALTF; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SHAPE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SHAPEN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ARGMAX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *GATHERND; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *GATHER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REALDIV; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *PACK; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SLICE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SLICED; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FLOORDIV; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SQUEEZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *UNSQUEEZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *STRIDEDSLICE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RANGE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RPNPROPOSALS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DECODEBBOX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *PAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *PADV2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *MIRRORPAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *TILE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SIZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CLIPBOXES; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FASTRCNNPREDICTIONS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SPLIT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SPLITV; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *EXPANDDIMS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *EMPTY; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *MEAN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *GREATER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SWITCH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SWITCHN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *MERGE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SYMBOLICGRADIENT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REMOTECALL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *_IF; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *STATELESSIF; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *IF; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CASE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *STATELESSCASE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *_WHILE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *WHILE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *STATELESSWHILE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *PARTITIONEDCALL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *STATEFULPARTITIONEDCALL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FAKEPARAM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *TRANSPOSE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *TRANSPOSED; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CAST; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REGION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *YOLO; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *YOLODETECTIONOUTPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FILL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REVERSE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *UNPACK; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *YOLO2REORG; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REDUCESUM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SUM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CONSTANT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RESIZEBILINEAR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RESIZEBILINEARGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *MAXIMUM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FRAMEWORKOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ARG; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FUSEDBATCHNORMGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LSTM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HIGHWAY; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RNN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ATTENTIONDECODER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LOGICAL_NOT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LOGICAL_AND; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LOGICAL_OR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *EQUAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *NOTEQUAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *INTERP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SHUFFLECHANNEL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *AIPP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *MULTISHAPE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RECIPROCAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SELU; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ELU; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ACOSH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ASINH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *MINIMUM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CLIP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *L2NORMALIZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CROPANDRESIZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *UNUSEDCONST; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SPARSETODENSE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *NONMAXSUPPRESSION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *TOPKV2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *INVERTPERMUTATION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *MULTINOMIAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REVERSESEQUENCE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REDUCEPROD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REDUCEMAX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REDUCEMIN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *EXTRACTIMAGEPATCHES; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SQRT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REDUCEALL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RESIZENEARESTNEIGHBOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SPACETOBATCHND; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *BATCHTOSPACEND; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ASSERT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *GREATEREQUAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FLOOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RANDOMUNIFORM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *BATCHMATMUL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SPACETODEPTH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DEPTHTOSPACE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RINT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ATAN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ATAN2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ATANH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ACOS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ASIN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *NEG; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LOG; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *TAN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ROUND; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *UPSAMPLE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FLOORMOD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LESS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LESSEQUAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ONEHOT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REFSWITCH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REFMERGE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ENTER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REFENTER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LOOPCOND; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *NEXTITERATION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REFNEXTITERATION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *EXIT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REFEXIT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CONTROLTRIGGER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ZEROSLIKE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *EXP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *WHERE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FAKEQUANTWITHMINMAXVARS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SOFTPLUS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SOFTSIGN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *COSH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SINH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SQUAREDDIFFERENCE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DATA; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *AIPPDATA; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CONVOLUTION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CORRELATION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CORRELATIONV2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DECONVOLUTION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *POOLING; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ELTWISE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RELU; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RELU6; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SIGMOID; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ABSVAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *TANH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *PRELU; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *BATCHNORM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FUSIONBATCHNORM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SCALE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FULL_CONNECTION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SOFTMAX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *PLUS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ACTIVATION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FLATTEN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ADD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SUB; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *MUL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *MATMUL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RSQRT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *BIASADD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RESHAPE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REFORMAT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DEPCONVOLUTION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DROPOUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DROPOUTGENMASK; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DROPOUTDOMASK; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CONCAT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ROIPOOLING; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *PROPOSAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FSRDETECTIONOUTPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DETECTIONPOSTPROCESS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LRN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *TRANSDATA; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *PERMUTE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SSDNORMALIZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SSDPRIORBOX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *NETOUTPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SSDDETECTIONOUTPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REFINEDETDETECTIONOUTPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CHANNELAXPY; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *PSROIPOOLING; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *POWER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *POW; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ROIALIGN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *PYTHON; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FREESPACEEXTRACT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SPATIALTF; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SHAPE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SHAPEN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ARGMAX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *GATHERND; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *GATHER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REALDIV; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *PACK; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SLICE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SLICED; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FLOORDIV; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SQUEEZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *UNSQUEEZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *STRIDEDSLICE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RANGE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RPNPROPOSALS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DECODEBBOX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *PAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *PADV2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *MIRRORPAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *TILE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SIZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CLIPBOXES; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FASTRCNNPREDICTIONS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SPLIT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SPLITV; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *EXPANDDIMS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *EMPTY; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *MEAN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *GREATER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SWITCH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SWITCHN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *MERGE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SYMBOLICGRADIENT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REMOTECALL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *_IF; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *STATELESSIF; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *IF; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CASE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *STATELESSCASE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *_WHILE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *WHILE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *STATELESSWHILE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *PARTITIONEDCALL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *STATEFULPARTITIONEDCALL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FAKEPARAM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *TRANSPOSE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *TRANSPOSED; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CAST; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REGION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *YOLO; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *YOLODETECTIONOUTPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FILL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REVERSE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *UNPACK; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *YOLO2REORG; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REDUCESUM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SUM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CONSTANT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FILECONSTANT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RESIZEBILINEAR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RESIZEBILINEARGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *MAXIMUM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FRAMEWORKOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ARG; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FUSEDBATCHNORMGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LSTM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HIGHWAY; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RNN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ATTENTIONDECODER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LOGICAL_NOT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LOGICAL_AND; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LOGICAL_OR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *EQUAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *NOTEQUAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *INTERP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SHUFFLECHANNEL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *AIPP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *MULTISHAPE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RECIPROCAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SELU; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ELU; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ACOSH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ASINH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *MINIMUM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CLIP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *L2NORMALIZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CROPANDRESIZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *UNUSEDCONST; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SPARSETODENSE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *NONMAXSUPPRESSION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *TOPKV2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *INVERTPERMUTATION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *MULTINOMIAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REVERSESEQUENCE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REDUCEPROD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REDUCEMAX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REDUCEMIN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *EXTRACTIMAGEPATCHES; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SQRT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REDUCEALL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RESIZENEARESTNEIGHBOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SPACETOBATCHND; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *BATCHTOSPACEND; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ASSERT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *GREATEREQUAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FLOOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RANDOMUNIFORM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *BATCHMATMUL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SPACETODEPTH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DEPTHTOSPACE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RINT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ATAN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ATAN2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ATANH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ACOS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ASIN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *NEG; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LOG; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *TAN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ROUND; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *UPSAMPLE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FLOORMOD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LESS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LESSEQUAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ONEHOT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REFSWITCH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REFMERGE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ENTER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REFENTER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LOOPCOND; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *NEXTITERATION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REFNEXTITERATION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *EXIT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REFEXIT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CONTROLTRIGGER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ZEROSLIKE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *EXP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *WHERE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FAKEQUANTWITHMINMAXVARS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SOFTPLUS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SOFTSIGN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *COSH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SINH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SQUAREDDIFFERENCE; | |||
// for retinanet scope fusion | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REQUIREDSPACETOBATCHPADDINGS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SSDPOSTPROCESSOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RETINANETBOXES; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RETINAMULTIANCHORS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RETINANETCLIPPEDBOXES; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RETINANETFILTEREDDETECTIONS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RETINANETPOSTPROCESSOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RETINANETANCHORS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FASTERRCNNMAP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FASTERRCNNMAP1; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FASTERRCNNSECONDSTAGEPOSTPROCESSOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FASTERRCNNROIINTERPOOLING; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FASTERRCNNFIRSTSTAGEPOSTPROCESSOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FASTERRCNNGRIDANCHORGENERATOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ROIINTERPOOLING; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FASTERRCNNCLIPTOWINDOW; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *EMBEDLOOKUP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HASHLOOKUP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LSH_PROJ; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SVDF; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SSDANCHORGENERATOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *IDENTITY; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *IDENTITYN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *PLACEHOLDERWITHDEFAULT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SELECT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *GETSPAN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *STOPGRADIENT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *PREVENTGRADIENT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *GUARANTEECONST; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *BROADCASTGRADIENTARGS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *BROADCASTARGS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CONFUSIONMATRIX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RANK; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *PLACEHOLDER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *END; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *BASICLSTMCELL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *GETNEXT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *INITDATA; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REFIDENTITY; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *BITCAST; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REQUIREDSPACETOBATCHPADDINGS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SSDPOSTPROCESSOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RETINANETBOXES; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RETINAMULTIANCHORS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RETINANETCLIPPEDBOXES; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RETINANETFILTEREDDETECTIONS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RETINANETPOSTPROCESSOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RETINANETANCHORS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FASTERRCNNMAP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FASTERRCNNMAP1; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FASTERRCNNSECONDSTAGEPOSTPROCESSOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FASTERRCNNROIINTERPOOLING; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FASTERRCNNFIRSTSTAGEPOSTPROCESSOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FASTERRCNNGRIDANCHORGENERATOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ROIINTERPOOLING; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FASTERRCNNCLIPTOWINDOW; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *EMBEDLOOKUP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HASHLOOKUP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LSH_PROJ; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SVDF; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SSDANCHORGENERATOR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *IDENTITY; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *IDENTITYN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *PLACEHOLDERWITHDEFAULT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SELECT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *GETSPAN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *STOPGRADIENT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *PREVENTGRADIENT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *GUARANTEECONST; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *BROADCASTGRADIENTARGS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *BROADCASTARGS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CONFUSIONMATRIX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RANK; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *PLACEHOLDER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *END; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *BASICLSTMCELL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *GETNEXT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *INITDATA; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REFIDENTITY; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *BITCAST; | |||
/***************Ann special operator*************************/ | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ANN_MEAN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ANN_CONVOLUTION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ANN_DEPCONVOLUTION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ANN_FULLCONNECTION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ANN_NETOUTPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ANN_DATA; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ANN_RESHAPE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ANN_ADD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ANN_MUL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ANN_SUB; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ANN_DIV; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ANN_DEQUANTIZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ANN_QUANTIZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ANN_PAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ANN_RESIZE_BILINEAR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ANN_MEAN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ANN_CONVOLUTION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ANN_DEPCONVOLUTION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ANN_FULLCONNECTION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ANN_NETOUTPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ANN_DATA; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ANN_RESHAPE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ANN_ADD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ANN_MUL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ANN_SUB; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ANN_DIV; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ANN_DEQUANTIZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ANN_QUANTIZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ANN_PAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ANN_RESIZE_BILINEAR; | |||
/***************************************************/ | |||
/******************Training operator*************************/ | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *GATHERV2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CONVGRADFILTER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CONV2D; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CONV2DBACKPROPINPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FUSEDBATCHNORM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *BIASADDGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ACTIVATIONGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *MAXPOOLWITHARGMAX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *MAXPOOLGRADWITHARGMAX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SPARSESOFTMAXCROSSENTROPYWITHLOGITS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SNAPSHOT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *VAR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *MEANGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *TRANSLATE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ADDN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *L2LOSS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *MULTIPLY; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HUBERLOSSGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HUBERLOSS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *NEGATIVE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SSDCAST; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SPARSESOFTMAXCROSSENTROPY; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SPARSESOFTMAXCROSSENTROPYGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SSDSQUEEZEFUSION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CONCATFOUR2FIVE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CONCATFIVE2FOUR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SSDREALDIVTILEMUL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SSDSUMMULREALDIVMEAN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *VARIABLEV2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *VARHANDLEOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *TEMPORARYVARIABLE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DESTROYTEMPORARYVARIABLE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *VARIABLE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ASSIGN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ASSIGNVARIABLEOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ASSIGNADD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ASSIGNADDVARIABLEOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ASSIGNSUB; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ASSIGNSUBVARIABLEOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPLYMOMENTUM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RESOURCEAPPLYMOMENTUM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SGD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *NOOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *READVARIABLEOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *PARALLELCONCATSTART; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CONSTANTOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DEPTHWISECONV2DBACKPROPFILTER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DEPTHWISECONV2DBACKPORPINPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DEPTHWISECONV2DFORWARDNATIVE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DROPOUTGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPLYRMSPROPMIXEDPRECISION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPLYRMSPROP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RELU6GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *AVGPOOLGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CONCATV2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CONCATOFFSET; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LAYERNORMGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LAYERNORM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LARS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DYNAMICSTITCH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *GATHERV2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CONVGRADFILTER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CONV2D; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CONV2DBACKPROPINPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FUSEDBATCHNORM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *BIASADDGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ACTIVATIONGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *MAXPOOLWITHARGMAX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *MAXPOOLGRADWITHARGMAX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SPARSESOFTMAXCROSSENTROPYWITHLOGITS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SNAPSHOT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *VAR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *MEANGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *TRANSLATE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ADDN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *L2LOSS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *MULTIPLY; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HUBERLOSSGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HUBERLOSS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *NEGATIVE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SSDCAST; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SPARSESOFTMAXCROSSENTROPY; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SPARSESOFTMAXCROSSENTROPYGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SSDSQUEEZEFUSION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CONCATFOUR2FIVE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CONCATFIVE2FOUR; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SSDREALDIVTILEMUL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SSDSUMMULREALDIVMEAN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *VARIABLEV2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *VARHANDLEOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *TEMPORARYVARIABLE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DESTROYTEMPORARYVARIABLE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *VARIABLE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ASSIGN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ASSIGNVARIABLEOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ASSIGNADD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ASSIGNADDVARIABLEOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ASSIGNSUB; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ASSIGNSUBVARIABLEOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPLYMOMENTUM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RESOURCEAPPLYMOMENTUM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SGD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *NOOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *READVARIABLEOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *PARALLELCONCATSTART; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CONSTANTOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DEPTHWISECONV2DBACKPROPFILTER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DEPTHWISECONV2DBACKPORPINPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DEPTHWISECONV2DFORWARDNATIVE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DROPOUTGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPLYRMSPROPMIXEDPRECISION; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPLYRMSPROP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RELU6GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *AVGPOOLGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CONCATV2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CONCATOFFSET; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LAYERNORMGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LAYERNORM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LARS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DYNAMICSTITCH; | |||
/***************************************************/ | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SQUARE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HCOMBROADCAST; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HCOMALLGATHER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HCOMALLREDUCE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HCOMREDUCESCATTER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HCOMSEND; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HCOMRECEIVE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HCOMREMOTEREAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HCOMREMOTEREFREAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HCOMREMOTEWRITE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HCOMREMOTESCATTERWRITE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *VARASSIGN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *VARISINITIALIZEDOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LogTimeStamp; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ISVARIABLEINITIALIZED; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *STREAMSWITCH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *STREAMSWITCHN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *STREAMACTIVE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *MEMCPYASYNC; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *MEMCPYADDRASYNC; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *STREAMMERGE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ENDGRAPH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SEND; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *RECV; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ENDOFSEQUENCE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LABELSET; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LABELGOTO; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LABELGOTOEX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LABELSWITCH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *LABELSWITCHBYINDEX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ATOMICADDRCLEAN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ABS_GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ACCUMULATE_N_V2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ACOS_GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ACOSH_GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ANY; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPROXIMATE_EQUAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ASIN_GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ASINH_GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ATAN_GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *BROADCAST_TO; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ELU_GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ADD_V2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DATAFORMATDIMMAP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DATAFORMATVECPERMUTE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *BESSELI0E; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *BESSELI1E; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPLYADADELTA; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPLYADAGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPLYADAGRADDA; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPLYADAM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPLYADAMAX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPLYADDSIGN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPLYCENTEREDRMSPROP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPLYFTRL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPLYFTRLV2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPLYGRADIENTDESCENT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPLYPOWERSIGN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPLYPROXIMALADAGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *APPLYPROXIMALGRADIENTDESCENT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DEQUANTIZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FOCAL_LOSS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *FOCAL_LOSS_GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SMOOTHL1_LOSS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SMOOTHL1_LOSS_grad; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *REDUCEMEAN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CONCAT_V2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *ONEHOT_V2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SLICE_V2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *TILE_V2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SUM_V2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SQUARE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HCOMBROADCAST; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HCOMALLGATHER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HCOMALLREDUCE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HCOMREDUCESCATTER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HCOMSEND; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HCOMRECEIVE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HCOMREMOTEREAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HCOMREMOTEREFREAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HCOMREMOTEWRITE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HCOMREMOTESCATTERWRITE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *VARASSIGN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *VARISINITIALIZEDOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LogTimeStamp; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ISVARIABLEINITIALIZED; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *STREAMSWITCH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *STREAMSWITCHN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *STREAMACTIVE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *MEMCPYASYNC; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *MEMCPYADDRASYNC; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *STREAMMERGE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ENDGRAPH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SEND; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *RECV; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ENDOFSEQUENCE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LABELSET; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LABELGOTO; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LABELGOTOEX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LABELSWITCH; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *LABELSWITCHBYINDEX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ATOMICADDRCLEAN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ABS_GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ACCUMULATE_N_V2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ACOS_GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ACOSH_GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ANY; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPROXIMATE_EQUAL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ASIN_GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ASINH_GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ATAN_GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *BROADCAST_TO; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ELU_GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ADD_V2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DATAFORMATDIMMAP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DATAFORMATVECPERMUTE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *BESSELI0E; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *BESSELI1E; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPLYADADELTA; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPLYADAGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPLYADAGRADDA; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPLYADAM; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPLYADAMAX; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPLYADDSIGN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPLYCENTEREDRMSPROP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPLYFTRL; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPLYFTRLV2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPLYGRADIENTDESCENT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPLYPOWERSIGN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPLYPROXIMALADAGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *APPLYPROXIMALGRADIENTDESCENT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DEQUANTIZE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FOCAL_LOSS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *FOCAL_LOSS_GRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SMOOTHL1_LOSS; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SMOOTHL1_LOSS_grad; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *REDUCEMEAN; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CONCAT_V2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *ONEHOT_V2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SLICE_V2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *TILE_V2; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SUM_V2; | |||
// Common type when the operator has the same name | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DETECTIONOUTPUT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DETECTIONOUTPUT; | |||
// Custom operator | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CUSTOMOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CUSTOMOP_NCHW; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CUSTOMOP_NHWC; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *CUSTOMOP_NC1HWC0; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CUSTOMOP; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CUSTOMOP_NCHW; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CUSTOMOP_NHWC; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *CUSTOMOP_NC1HWC0; | |||
// Depthwise 4d_2_6d,6d_2_4d | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DEPTHWISEWEIGHT4D26D; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *DEPTHWISEWEIGHT6D24D; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DEPTHWISEWEIGHT4D26D; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *DEPTHWISEWEIGHT6D24D; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SQRTGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *SIGMOIDGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SQRTGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *SIGMOIDGRAD; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *TRANSSHAPE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *TRANSSHAPE; | |||
// Horovod operator | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HVDCALLBACKALLREDUCE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HVDCALLBACKALLGATHER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HVDCALLBACKBROADCAST; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const char *HVDWAIT; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HVDCALLBACKALLREDUCE; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HVDCALLBACKALLGATHER; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HVDCALLBACKBROADCAST; | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY extern const ge::char_t *HVDWAIT; | |||
/// | |||
/// @brief Magic number of model file | |||
@@ -31,8 +31,10 @@ | |||
namespace ge { | |||
const std::string PNE_ID_NPU = "NPU"; | |||
const std::string PNE_ID_CPU = "HOST_CPU"; | |||
const std::string PNE_ID_UDF = "UDF"; | |||
struct ModelRelation; | |||
struct ModelDeployResource; | |||
class PneModel { | |||
public: | |||
PneModel() = default; | |||
@@ -100,6 +102,14 @@ class PneModel { | |||
return model_relation_; | |||
} | |||
inline void SetDeployResource(std::shared_ptr<ModelDeployResource> deploy_resource) { | |||
deploy_resource_ = std::move(deploy_resource); | |||
} | |||
inline const std::shared_ptr<ModelDeployResource> GetDeployResource() const { | |||
return deploy_resource_; | |||
} | |||
public: | |||
virtual Status SerializeModel(ModelBufferData &model_buff) = 0; | |||
@@ -113,9 +123,14 @@ class PneModel { | |||
return model_id_; | |||
} | |||
virtual std::string GetLogicDeviceId() const { | |||
return ""; | |||
} | |||
private: | |||
std::map<std::string, std::shared_ptr<PneModel>> submodels_; | |||
std::shared_ptr<ModelRelation> model_relation_; | |||
std::shared_ptr<ModelDeployResource> deploy_resource_; | |||
ComputeGraphPtr root_graph_ = nullptr; | |||
std::string model_name_; | |||
std::string model_type_; | |||
@@ -29,6 +29,8 @@ | |||
namespace ge { | |||
class ProcessNodeEngineImpl { | |||
public: | |||
virtual ~ProcessNodeEngineImpl() = default; | |||
virtual Status OptimizeGraph(const std::vector<GeTensor> &inputs, ComputeGraphPtr &compute_graph) = 0; | |||
virtual Status BuildGraph(ComputeGraphPtr &compute_graph, PneModelPtr &model) = 0; | |||
@@ -56,6 +58,22 @@ class ProcessNodeEngine { | |||
virtual void SetImpl(ProcessNodeEngineImplPtr impl) = 0; | |||
virtual Status AddGraph(const ComputeGraphPtr &compute_graph, const std::map<std::string, std::string> &options) { | |||
(void)compute_graph; | |||
(void)options; | |||
return SUCCESS; | |||
} | |||
virtual Status RemoveGraph(const uint32_t graph_id) { | |||
(void)graph_id; | |||
return SUCCESS; | |||
} | |||
virtual Status ParallelPartition(const ComputeGraphPtr &compute_graph) { | |||
(void)compute_graph; | |||
return NOT_CHANGED; | |||
} | |||
protected: | |||
std::string engine_id_; | |||
ProcessNodeEngineImplPtr impl_ = nullptr; | |||
@@ -0,0 +1,56 @@ | |||
/** | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2022. All rights reserved. | |||
* | |||
* 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 AIR_CXX_INC_FRAMEWORK_RUNTIME_EXE_GRAPH_EXECUTOR_H_ | |||
#define AIR_CXX_INC_FRAMEWORK_RUNTIME_EXE_GRAPH_EXECUTOR_H_ | |||
#include "graph/ge_error_codes.h" | |||
#include "common/ge_visibility.h" | |||
#include "exe_graph_resource_guard.h" | |||
#include "subscriber/executor_subscriber_c.h" | |||
namespace gert { | |||
class VISIBILITY_EXPORT ExeGraphExecutor { | |||
public: | |||
ge::graphStatus Load() const { | |||
return ge::GRAPH_SUCCESS; | |||
} | |||
ge::graphStatus UnLoad() const { | |||
return ge::GRAPH_SUCCESS; | |||
} | |||
/** | |||
* 设置图执行的输入/输出,需要注意的是,使用者需要自己保证inputs/outputs刷新完全!!! | |||
*/ | |||
ge::graphStatus SpecifyInputs(void **inputs, size_t start, size_t num); | |||
ge::graphStatus SpecifyOutputs(void **outputs, size_t num); | |||
ge::graphStatus Execute(); | |||
ge::graphStatus Execute(ExecutorSubscriber *callback); | |||
const void *GetExecutionData() const { | |||
return execution_data_; | |||
} | |||
ResourceGuard &GetResourceGuard(); | |||
void *SetExecutionData(std::unique_ptr<uint8_t[]> execution_data); | |||
private: | |||
friend class ModelV2ExecutorTestHelper; | |||
void *execution_data_{nullptr}; | |||
ResourceGuard resource_guard_; | |||
}; | |||
} // namespace gert | |||
#endif // AIR_CXX_INC_FRAMEWORK_RUNTIME_EXE_GRAPH_EXECUTOR_H_ |
@@ -0,0 +1,69 @@ | |||
/** | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2022. All rights reserved. | |||
* | |||
* 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 AIR_CXX_INC_FRAMEWORK_RUNTIME_EXE_GRAPH_RESOURCE_GUARD_H_ | |||
#define AIR_CXX_INC_FRAMEWORK_RUNTIME_EXE_GRAPH_RESOURCE_GUARD_H_ | |||
#include <memory> | |||
#include <vector> | |||
#include <cstdint> | |||
#include "common/ge_visibility.h" | |||
namespace gert { | |||
class VISIBILITY_EXPORT ResourceGuard { | |||
public: | |||
void *ResetExecutionData(std::unique_ptr<uint8_t[]> execution_data); | |||
void ResetAnyValue(std::unique_ptr<uint8_t[]> any_values, size_t count); | |||
void PushNode(void *node); | |||
void PushWatcher(void *watcher); | |||
void *ResetNodesArray(std::unique_ptr<uint8_t[]> nodes_array); | |||
void *ResetStartNodesArray(std::unique_ptr<uint8_t[]> start_nodes_array); | |||
void *ResetNodesIndgreeArray(std::unique_ptr<uint8_t[]> nodes_indgree_array); | |||
void *ResetNodesWaitIndgreeArray(std::unique_ptr<uint8_t[]> nodes_indgree_array); | |||
void *ResetInputsArray(std::unique_ptr<uint8_t[]> inputs_array); | |||
void *ResetOutputsArray(std::unique_ptr<uint8_t[]> outputs_array); | |||
void *ResetWatchersArray(std::unique_ptr<uint8_t[]> watchers_array); | |||
void *ResetReadyQueue(void *ready_queue); | |||
void *ResetBuffer(std::unique_ptr<uint8_t[]> buffer); | |||
void *ResetComputeNodeInfo(std::unique_ptr<uint8_t[]> compute_node_info); | |||
void *ResetKernelExtendInfo(std::unique_ptr<uint8_t[]> kernel_extend_info); | |||
void *ResetModelDesc(std::unique_ptr<uint8_t[]> model_desc); | |||
~ResourceGuard(); | |||
private: | |||
std::unique_ptr<uint8_t[]> execution_data_holder_; | |||
size_t any_values_num_; | |||
std::unique_ptr<uint8_t[]> any_values_guard_; | |||
std::vector<std::unique_ptr<void, decltype(&free)>> nodes_guarder_; | |||
std::vector<std::unique_ptr<void, decltype(&free)>> watchers_guarder_; | |||
std::unique_ptr<uint8_t[]> continuous_buffer_guarder_; | |||
std::unique_ptr<uint8_t[]> buffer_guarder_; | |||
std::unique_ptr<uint8_t[]> compute_node_info_guarder_; | |||
std::unique_ptr<uint8_t[]> kernel_extend_info_guarder_; | |||
std::unique_ptr<uint8_t[]> model_desc_guarder_; | |||
std::unique_ptr<uint8_t[]> nodes_array_guarder_; | |||
std::unique_ptr<uint8_t[]> start_nodes_array_guarder_; | |||
std::unique_ptr<uint8_t[]> nodes_indgree_array_guarder_; | |||
std::unique_ptr<uint8_t[]> nodes_wait_indgree_array_guarder_; | |||
std::unique_ptr<uint8_t[]> inputs_array_guarder_; | |||
std::unique_ptr<uint8_t[]> outputs_array_guarder_; | |||
std::unique_ptr<uint8_t[]> watchers_array_guarder_; | |||
std::unique_ptr<void, decltype(&free)> ready_queue_guarder_{nullptr, nullptr}; | |||
}; | |||
} // namespace gert | |||
#endif // AIR_CXX_INC_FRAMEWORK_RUNTIME_EXE_GRAPH_RESOURCE_GUARD_H_ |
@@ -18,9 +18,13 @@ | |||
#define AIR_CXX_INC_FRAMEWORK_RUNTIME_GERT_API_H_ | |||
#include "model_v2_executor.h" | |||
#include "common/ge_types.h" | |||
#include "common/ge_visibility.h" | |||
namespace gert { | |||
std::unique_ptr<ModelV2Executor> LoadExecutorFromFile(const char *file_path, ge::graphStatus &error_code); | |||
VISIBILITY_EXPORT | |||
std::unique_ptr<ModelV2Executor> LoadExecutorFromFile(const char *model_path, ge::graphStatus &error_code); | |||
VISIBILITY_EXPORT | |||
std::unique_ptr<ModelV2Executor> LoadExecutorFromModelData(const ge::ModelData &model_data, | |||
ge::graphStatus &error_code); | |||
} // namespace gert | |||
@@ -1,94 +1,96 @@ | |||
/** | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2022. All rights reserved. | |||
* | |||
* 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 AIR_CXX_INC_FRAMEWORK_RUNTIME_MODEL_DESC_H_ | |||
#define AIR_CXX_INC_FRAMEWORK_RUNTIME_MODEL_DESC_H_ | |||
#include "common/ge_types.h" | |||
#include "exe_graph/runtime/shape.h" | |||
#include "exe_graph/runtime/continuous_vector.h" | |||
#include "exe_graph/runtime/storage_format.h" | |||
#include "exe_graph/runtime/storage_shape.h" | |||
namespace gert { | |||
class ShapeRange { | |||
public: | |||
const Shape &GetMin() const; | |||
const Shape &GetMax() const; | |||
Shape &MutableMin(); | |||
Shape &MutableMax(); | |||
private: | |||
Shape min_; | |||
Shape max_; | |||
}; | |||
class ModelIoDesc { | |||
public: | |||
const char *GetName() const; | |||
int32_t GetDataType() const; | |||
ge::Format GetStorageFormat() const; | |||
ge::Format GetOriginFormat() const; | |||
int64_t GetSize() const; | |||
const Shape &GetStorageShape() const; | |||
const Shape &GetOriginShape() const; | |||
const ShapeRange &GetOriginShapeRange() const; | |||
const ShapeRange &GetStorageShapeRange() const; | |||
void SetName(const char *name); | |||
void SetDataType(int32_t data_type); | |||
void SetStorageFormat(ge::Format format); | |||
void SetOriginFormat(ge::Format format); | |||
Shape &MutableStorageShape(); | |||
Shape &MutableOriginShape(); | |||
ShapeRange &MutableOriginShapeRange(); | |||
ShapeRange &MutableStorageShapeRange(); | |||
private: | |||
const char *name_; | |||
int32_t data_type_; | |||
StorageFormat format_; | |||
StorageShape shape_; | |||
ShapeRange storage_shape_range_; | |||
ShapeRange origin_shape_range_; | |||
}; | |||
class ModelDesc { | |||
public: | |||
static size_t CalcSize(size_t input_num, size_t output_num); | |||
const ModelIoDesc *GetInputDesc(size_t index) const; | |||
const ModelIoDesc *GetAllInputsDesc(size_t &input_num) const; | |||
const ModelIoDesc *GetOutputDesc(size_t index) const; | |||
const ModelIoDesc *GetAllOutputsDesc(size_t &output_num) const; | |||
ModelIoDesc *MutableInputDesc(size_t index); | |||
ModelIoDesc *MutableOutputDesc(size_t index); | |||
ModelIoDesc *AllMutableIoDesc(size_t &input_num, size_t &output_num); | |||
void SetInputNum(size_t input_num); | |||
void SetOutputNum(size_t output_num); | |||
ge::graphStatus GetDynamicBatchInfo(std::vector<std::vector<int64_t>> &batch_info, int32_t &dynamic_type) const; | |||
ge::graphStatus GetUserDesignateShapeOrder(std::vector<std::string> &user_designate_shape_order) const; | |||
ge::graphStatus GetModelAttrs(std::vector<std::string> &attrs) const; | |||
private: | |||
size_t input_num_; | |||
size_t output_num_; | |||
ContinuousVector model_io_descs_; | |||
}; | |||
} // namespace gert | |||
/** | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2022. All rights reserved. | |||
* | |||
* 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 AIR_CXX_INC_FRAMEWORK_RUNTIME_MODEL_DESC_H_ | |||
#define AIR_CXX_INC_FRAMEWORK_RUNTIME_MODEL_DESC_H_ | |||
#include "common/ge_types.h" | |||
#include "common/ge_visibility.h" | |||
#include "exe_graph/runtime/shape.h" | |||
#include "exe_graph/runtime/continuous_vector.h" | |||
#include "exe_graph/runtime/storage_format.h" | |||
#include "exe_graph/runtime/storage_shape.h" | |||
namespace gert { | |||
class VISIBILITY_EXPORT ShapeRange { | |||
public: | |||
const Shape &GetMin() const; | |||
const Shape &GetMax() const; | |||
Shape &MutableMin(); | |||
Shape &MutableMax(); | |||
private: | |||
Shape min_; | |||
Shape max_; | |||
}; | |||
class VISIBILITY_EXPORT ModelIoDesc { | |||
public: | |||
const char *GetName() const; | |||
int32_t GetDataType() const; | |||
ge::Format GetStorageFormat() const; | |||
ge::Format GetOriginFormat() const; | |||
int64_t GetSize() const; | |||
const Shape &GetStorageShape() const; | |||
const Shape &GetOriginShape() const; | |||
const ShapeRange &GetOriginShapeRange() const; | |||
const ShapeRange &GetStorageShapeRange() const; | |||
void SetName(const char *name); | |||
void SetDataType(int32_t data_type); | |||
void SetStorageFormat(ge::Format format); | |||
void SetOriginFormat(ge::Format format); | |||
Shape &MutableStorageShape(); | |||
Shape &MutableOriginShape(); | |||
ShapeRange &MutableOriginShapeRange(); | |||
ShapeRange &MutableStorageShapeRange(); | |||
private: | |||
const char *name_; | |||
int32_t data_type_; | |||
StorageFormat format_; | |||
StorageShape shape_; | |||
ShapeRange storage_shape_range_; | |||
ShapeRange origin_shape_range_; | |||
}; | |||
class VISIBILITY_EXPORT ModelDesc { | |||
public: | |||
static size_t CalcSize(size_t input_num, size_t output_num); | |||
const ModelIoDesc *GetInputDesc(size_t index) const; | |||
const ModelIoDesc *GetAllInputsDesc(size_t &input_num) const; | |||
const ModelIoDesc *GetOutputDesc(size_t index) const; | |||
const ModelIoDesc *GetAllOutputsDesc(size_t &output_num) const; | |||
ModelIoDesc *MutableInputDesc(size_t index); | |||
ModelIoDesc *MutableOutputDesc(size_t index); | |||
ModelIoDesc *AllMutableIoDesc(size_t &input_num, size_t &output_num); | |||
void SetInputNum(size_t input_num); | |||
void SetOutputNum(size_t output_num); | |||
ge::graphStatus GetDynamicBatchInfo(std::vector<std::vector<int64_t>> &batch_info, int32_t &dynamic_type) const; | |||
ge::graphStatus GetUserDesignateShapeOrder(std::vector<std::string> &user_designate_shape_order) const; | |||
ge::graphStatus GetModelAttrs(std::vector<std::string> &attrs) const; | |||
private: | |||
size_t input_num_; | |||
size_t output_num_; | |||
ContinuousVector model_io_descs_; | |||
}; | |||
} // namespace gert | |||
#endif // AIR_CXX_INC_FRAMEWORK_RUNTIME_MODEL_DESC_H_ |
@@ -22,94 +22,25 @@ | |||
#include "model_desc.h" | |||
#include "runtime/stream.h" | |||
#include "exe_graph/runtime/tensor.h" | |||
#include "common/ge_visibility.h" | |||
#include "exe_graph_resource_guard.h" | |||
#include "exe_graph_executor.h" | |||
#include "subscriber/executor_subscribers_scheduler.h" | |||
namespace gert { | |||
enum SubExeGraphType { kInitExeGraph, kMainExeGraph, kDeInitExeGraph, kSubExeGraphTypeEnd }; | |||
static constexpr char *kSubExeGraphTypeStrs[kSubExeGraphTypeEnd] = {(char *)"Init", (char *)"Main", (char *)"DeInit"}; | |||
static constexpr char *kSubExeGraphTypeStrs[kSubExeGraphTypeEnd] = { | |||
const_cast<char *>("Init"), const_cast<char *>("Main"), const_cast<char *>("DeInit")}; | |||
inline const char *GetSubExeGraphTypeStr(SubExeGraphType type) { | |||
return kSubExeGraphTypeStrs[type]; | |||
} | |||
class ResourceGuard { | |||
public: | |||
void *ResetExecutionData(std::unique_ptr<uint8_t[]> execution_data); | |||
void ResetAnyValue(std::unique_ptr<uint8_t[]> any_values, size_t count); | |||
void PushNode(void *node); | |||
void PushWatcher(void *watcher); | |||
void *ResetNodesArray(std::unique_ptr<uint8_t[]> nodes_array); | |||
void *ResetStartNodesArray(std::unique_ptr<uint8_t[]> start_nodes_array); | |||
void *ResetNodesIndgreeArray(std::unique_ptr<uint8_t[]> nodes_indgree_array); | |||
void *ResetNodesWaitIndgreeArray(std::unique_ptr<uint8_t[]> nodes_indgree_array); | |||
void *ResetInputsArray(std::unique_ptr<uint8_t[]> inputs_array); | |||
void *ResetOutputsArray(std::unique_ptr<uint8_t[]> outputs_array); | |||
void *ResetWatchersArray(std::unique_ptr<uint8_t[]> watchers_array); | |||
void *ResetReadyQueue(void *ready_queue); | |||
void *ResetBuffer(std::unique_ptr<uint8_t[]> buffer); | |||
void *ResetComputeNodeInfo(std::unique_ptr<uint8_t[]> compute_node_info); | |||
void *ResetKernelExtendInfo(std::unique_ptr<uint8_t[]> kernel_extend_info); | |||
void *ResetModelDesc(std::unique_ptr<uint8_t[]> model_desc); | |||
~ResourceGuard(); | |||
private: | |||
std::unique_ptr<uint8_t[]> execution_data_holder_; | |||
size_t any_values_num_; | |||
std::unique_ptr<uint8_t[]> any_values_guard_; | |||
std::vector<std::unique_ptr<void, decltype(&free)>> nodes_guarder_; | |||
std::vector<std::unique_ptr<void, decltype(&free)>> watchers_guarder_; | |||
std::unique_ptr<uint8_t[]> continuous_buffer_guarder_; | |||
std::unique_ptr<uint8_t[]> buffer_guarder_; | |||
std::unique_ptr<uint8_t[]> compute_node_info_guarder_; | |||
std::unique_ptr<uint8_t[]> kernel_extend_info_guarder_; | |||
std::unique_ptr<uint8_t[]> model_desc_guarder_; | |||
std::unique_ptr<uint8_t[]> nodes_array_guarder_; | |||
std::unique_ptr<uint8_t[]> start_nodes_array_guarder_; | |||
std::unique_ptr<uint8_t[]> nodes_indgree_array_guarder_; | |||
std::unique_ptr<uint8_t[]> nodes_wait_indgree_array_guarder_; | |||
std::unique_ptr<uint8_t[]> inputs_array_guarder_; | |||
std::unique_ptr<uint8_t[]> outputs_array_guarder_; | |||
std::unique_ptr<uint8_t[]> watchers_array_guarder_; | |||
std::unique_ptr<void, decltype(&free)> ready_queue_guarder_{nullptr, nullptr}; | |||
}; | |||
struct ModelExecuteArg { | |||
rtStream_t stream; | |||
}; | |||
static_assert(std::is_standard_layout<ModelExecuteArg>::value, "The class ModelExecuteArg must be a POD"); | |||
class ExeGraphExecutor { | |||
public: | |||
// todo unload时释放anyvalue资源 | |||
ge::graphStatus Load() { | |||
return ge::GRAPH_SUCCESS; | |||
} | |||
ge::graphStatus UnLoad() { | |||
return ge::GRAPH_SUCCESS; | |||
} | |||
/** | |||
* 设置图执行的输入/输出,需要注意的是,使用者需要自己保证inputs/outputs刷新完全!!! | |||
*/ | |||
ge::graphStatus SpecifyInputs(void **inputs, size_t start, size_t num); | |||
ge::graphStatus SpecifyOutputs(void **outputs, size_t num); | |||
ge::graphStatus Execute(); | |||
const void *GetExecutionData() const { | |||
return execution_data_; | |||
} | |||
ResourceGuard &GetResourceGuard(); | |||
void *SetExecutionData(std::unique_ptr<uint8_t[]> execution_data); | |||
private: | |||
friend class ModelV2ExecutorTestHelper; | |||
void *execution_data_; | |||
ResourceGuard resource_guard_; | |||
}; | |||
class ModelV2Executor { | |||
class VISIBILITY_EXPORT ModelV2Executor { | |||
public: | |||
static std::unique_ptr<ModelV2Executor> Create(const ge::ComputeGraphPtr &root_graph); | |||
@@ -121,6 +52,12 @@ class ModelV2Executor { | |||
const ModelDesc &GetModelDesc() const; | |||
void SetModelDesc(ModelDesc *model_desc); | |||
ExeGraphExecutor &GetMainExeGraphExecutor() { | |||
return graphs_[kMainExeGraph]; | |||
} | |||
ExecutorSubscribersScheduler &GetSubscribers(); | |||
const ExecutorSubscribersScheduler &GetSubscribers() const; | |||
ModelV2Executor(const ModelV2Executor &) = delete; | |||
ModelV2Executor(ModelV2Executor &&) = delete; | |||
ModelV2Executor &operator=(const ModelV2Executor &) = delete; | |||
@@ -129,13 +66,14 @@ class ModelV2Executor { | |||
private: | |||
friend class ModelV2ExecutorBuilder; | |||
friend class ModelV2ExecutorTestHelper; | |||
ModelV2Executor() = default; | |||
ModelV2Executor(); | |||
private: | |||
std::array<ExeGraphExecutor, kSubExeGraphTypeEnd> graphs_; | |||
ResourceGuard resource_guard_; | |||
ModelDesc *model_desc_ = nullptr; | |||
rtStream_t default_stream_ = nullptr; | |||
ExecutorSubscribersScheduler subscribers_; | |||
}; | |||
} // namespace gert | |||
@@ -0,0 +1,71 @@ | |||
/** | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2022. All rights reserved. | |||
* | |||
* 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 AIR_CXX_INC_FRAMEWORK_RUNTIME_SUBSCRIBER_BUILT_IN_SUBSCRIBER_DEFINITIONS_H_ | |||
#define AIR_CXX_INC_FRAMEWORK_RUNTIME_SUBSCRIBER_BUILT_IN_SUBSCRIBER_DEFINITIONS_H_ | |||
#include <type_traits> | |||
#include <vector> | |||
#include "framework/common/ge_visibility.h" | |||
namespace gert { | |||
constexpr size_t kProfilingDataCap = 10UL * 1024UL * 1024UL; | |||
constexpr size_t kInitSize = 10UL * 1024UL; | |||
constexpr size_t kModelStrIdx = 0UL; | |||
constexpr size_t kExecuteStrIdx = 1UL; | |||
constexpr size_t kRegStartIdx = 2UL; | |||
constexpr size_t kDouble = 2UL; | |||
enum class BuiltInSubscriberType { kProfiling, kDumper, kNum }; | |||
enum class ProfilingType { | |||
kHost, // 打开Host侧调度的profiling | |||
kDevice, | |||
kGeHost, // 打开GE Host侧调度的profiling | |||
kSingleOpReg, // 单算子需要打开此开关开始register node name和kernel type | |||
kNum, | |||
kAll = kNum | |||
}; | |||
static_assert(static_cast<size_t>(ProfilingType::kNum) < sizeof(uint64_t) * 8, | |||
"The max num of profiling type must less than the width of uint64"); | |||
enum class DumpType { kDataDump, kExceptionDump, kExceptionSave, kNum, kAll = kNum }; | |||
static_assert(static_cast<size_t>(DumpType::kNum) < sizeof(uint64_t) * 8, | |||
"The max num of dumper type must less than the width of uint64"); | |||
class VISIBILITY_EXPORT BuiltInSubscriberUtil { | |||
public: | |||
template <typename T, | |||
typename std::enable_if<(std::is_same<T, ProfilingType>::value) || (std::is_same<T, DumpType>::value), | |||
int>::type = 0> | |||
constexpr static uint64_t EnableBit(T et) { | |||
return 1UL << static_cast<size_t>(et); | |||
} | |||
template <typename T, | |||
typename std::enable_if<(std::is_same<T, ProfilingType>::value) || (std::is_same<T, DumpType>::value), | |||
int>::type = 0> | |||
static uint64_t BuildEnableFlags(const std::vector<T> &enable_types) { | |||
uint64_t flag = 0UL; | |||
for (auto et : enable_types) { | |||
if (et == T::kAll) { | |||
return EnableBit(T::kNum) - 1UL; | |||
} | |||
flag |= EnableBit(et); | |||
} | |||
return flag; | |||
} | |||
}; | |||
} // namespace gert | |||
#endif // AIR_CXX_INC_FRAMEWORK_RUNTIME_SUBSCRIBER_BUILT_IN_SUBSCRIBER_DEFINITIONS_H_ |
@@ -0,0 +1,33 @@ | |||
/** | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2022. All rights reserved. | |||
* | |||
* 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 AIR_CXX_INC_FRAMEWORK_RUNTIME_EXECUTOR_SUBSCRIBER_C_H_ | |||
#define AIR_CXX_INC_FRAMEWORK_RUNTIME_EXECUTOR_SUBSCRIBER_C_H_ | |||
#include "exe_graph/runtime/base_type.h" | |||
#ifdef __cplusplus | |||
extern "C" { | |||
#endif | |||
typedef enum { kExecuteStart, kExecuteEnd, kModelStart, kModelEnd, kExecuteEventEnd } ExecutorEvent; | |||
typedef void (*SubscriberFunc)(void *arg, ExecutorEvent event, const void *node, KernelStatus result); | |||
typedef struct { | |||
SubscriberFunc callback; | |||
void *arg; | |||
} ExecutorSubscriber; | |||
#ifdef __cplusplus | |||
} | |||
#endif | |||
#endif // AIR_CXX_INC_FRAMEWORK_RUNTIME_EXECUTOR_SUBSCRIBER_C_H_ |
@@ -0,0 +1,76 @@ | |||
/** | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2022. All rights reserved. | |||
* | |||
* 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 AIR_CXX_INC_FRAMEWORK_RUNTIME_EXECUTOR_SUBSCRIBER_GUARDER_H_ | |||
#define AIR_CXX_INC_FRAMEWORK_RUNTIME_EXECUTOR_SUBSCRIBER_GUARDER_H_ | |||
#include "framework/common/ge_visibility.h" | |||
#include "common/checker.h" | |||
#include "executor_subscriber_c.h" | |||
namespace gert { | |||
template <typename T> | |||
void ObjectDeleter(void *obj) { | |||
delete static_cast<T *>(obj); | |||
} | |||
class VISIBILITY_EXPORT ExecutorSubscriberGuarder { | |||
public: | |||
using ArgDeleter = void (*)(void *); | |||
ExecutorSubscriberGuarder(::SubscriberFunc func, void *arg, ArgDeleter deleter) | |||
: subscriber_({func, arg}), arg_deleter_(deleter) {} | |||
ExecutorSubscriberGuarder(ExecutorSubscriberGuarder &&other) noexcept { | |||
MoveAssignment(other); | |||
} | |||
ExecutorSubscriberGuarder &operator=(ExecutorSubscriberGuarder &&other) noexcept { | |||
DeleteArg(); | |||
MoveAssignment(other); | |||
return *this; | |||
} | |||
ExecutorSubscriber &GetSubscriber() { | |||
return subscriber_; | |||
} | |||
const ExecutorSubscriber &GetSubscriber() const { | |||
return subscriber_; | |||
} | |||
~ExecutorSubscriberGuarder() { | |||
DeleteArg(); | |||
} | |||
ExecutorSubscriberGuarder(const ExecutorSubscriberGuarder &) = delete; | |||
ExecutorSubscriberGuarder &operator=(const ExecutorSubscriberGuarder &) = delete; | |||
private: | |||
void DeleteArg() { | |||
if (arg_deleter_ != nullptr) { | |||
arg_deleter_(subscriber_.arg); | |||
} | |||
} | |||
void MoveAssignment(ExecutorSubscriberGuarder &other) { | |||
subscriber_ = other.subscriber_; | |||
arg_deleter_ = other.arg_deleter_; | |||
other.subscriber_ = {nullptr, nullptr}; | |||
other.arg_deleter_ = nullptr; | |||
} | |||
private: | |||
ExecutorSubscriber subscriber_{nullptr, nullptr}; | |||
ArgDeleter arg_deleter_{nullptr}; | |||
}; | |||
} // namespace gert | |||
#endif // AIR_CXX_INC_FRAMEWORK_RUNTIME_EXECUTOR_SUBSCRIBER_GUARDER_H_ |
@@ -0,0 +1,149 @@ | |||
/** | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2022. All rights reserved. | |||
* | |||
* 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 AIR_CXX_INC_FRAMEWORK_RUNTIME_EXECUTOR_SUBSCRIBERS_SCHEDULER_H_ | |||
#define AIR_CXX_INC_FRAMEWORK_RUNTIME_EXECUTOR_SUBSCRIBERS_SCHEDULER_H_ | |||
#include <vector> | |||
#include <array> | |||
#include "executor_subscriber_guarder.h" | |||
#include "built_in_subscriber_definitions.h" | |||
#include "global_profiling.h" | |||
#include "framework/common/ge_visibility.h" | |||
namespace gert { | |||
namespace { | |||
constexpr size_t kInitSubscriberSize = 1UL; | |||
} | |||
class ModelV2Executor; | |||
class VISIBILITY_EXPORT ExecutorSubscribersScheduler { | |||
public: | |||
static void OnExecuteEvent(ExecutorSubscribersScheduler *ins, ExecutorEvent event, const void *node, | |||
KernelStatus result); | |||
ExecutorSubscribersScheduler() | |||
: executor_(nullptr), | |||
enabled_(false), | |||
built_in_subscribers_ptr_(), | |||
subscribers_(), | |||
subscriber_wrapper_({reinterpret_cast<::SubscriberFunc>(ExecutorSubscribersScheduler::OnExecuteEvent), this}) {} | |||
#ifdef ONLY_COMPILE_OPEN_SRC | |||
~ExecutorSubscribersScheduler(); | |||
#endif | |||
void Init(ModelV2Executor *executor); | |||
ExecutorSubscribersScheduler(const ExecutorSubscribersScheduler &) = delete; | |||
ExecutorSubscribersScheduler &operator=(const ExecutorSubscribersScheduler &) = delete; | |||
ExecutorSubscriber &GetSubscriber() { | |||
if (subscribers_.size() == 1UL) { | |||
return subscribers_[0].GetSubscriber(); | |||
} else { | |||
return subscriber_wrapper_; | |||
} | |||
} | |||
ModelV2Executor *GetModelV2Executor() { | |||
return executor_; | |||
} | |||
const ModelV2Executor *GetModelV2Executor() const { | |||
return executor_; | |||
} | |||
/** | |||
* 设置订阅者,订阅者需要实现一个static方法,原型为: | |||
* ```c++ | |||
* static void OnExecuteEvent(T *void_arg, ExecutorEvent event, const void *node, KernelStatus result); | |||
* ``` | |||
* | |||
* 默认情况下,subscribers处于disable状态,在添加首个subscriber时,自动将状态切换到enable状态。 | |||
* | |||
* @tparam T 订阅者类型 | |||
* @tparam Args 订阅者初始化参数类型 | |||
* @param args 订阅者初始化参数 | |||
* @return 添加的subscriber指针,注意subscriber所有权归`ExecutorSubscribersScheduler`所有,外部使用者不可以释放此指针 | |||
*/ | |||
template <typename T, typename... Args> | |||
T *AddSubscriber(Args... args) { | |||
auto ins = new (std::nothrow) T(args...); | |||
if (ins == nullptr) { | |||
return nullptr; | |||
} | |||
// profiler exists when ess init | |||
if (subscribers_.size() == kInitSubscriberSize) { | |||
enabled_ = true; | |||
} | |||
subscribers_.emplace_back(reinterpret_cast<::SubscriberFunc>(T::OnExecuteEvent), ins, ObjectDeleter<T>); | |||
return ins; | |||
} | |||
/** | |||
* 添加一个内置的subscriber | |||
* 内置subscriber较少,当前没有使用注册机制,后续如果需要扩展,那么可以考虑通过注册机制自动注册。 | |||
* 为了易用性,在本类提供了获取内置subscriber的指针的接口。而自注册的subscriber将丢失此能力。 | |||
* @param subscriber_type | |||
*/ | |||
void AddBuiltIn(BuiltInSubscriberType subscriber_type, uint64_t enable_flag); | |||
void RemoveSubscriber(void *subscriber_ptr) { | |||
for (auto iter = subscribers_.begin(); iter != subscribers_.end(); ++iter) { | |||
if (iter->GetSubscriber().arg == subscriber_ptr) { | |||
subscribers_.erase(iter); | |||
break; | |||
} | |||
} | |||
for (auto &built_in_subscriber : built_in_subscribers_ptr_) { | |||
if (built_in_subscriber == subscriber_ptr) { | |||
built_in_subscriber = nullptr; | |||
} | |||
} | |||
if (subscribers_.empty()) { | |||
enabled_ = false; | |||
} | |||
} | |||
template <typename T> | |||
inline T *MutableBuiltInSubscriber(const BuiltInSubscriberType type) { | |||
return static_cast<T *>(built_in_subscribers_ptr_[static_cast<size_t>(type)]); | |||
} | |||
template <typename T> | |||
inline const T *GetBuiltInSubscriber(const BuiltInSubscriberType type) { | |||
return static_cast<T *>(built_in_subscribers_ptr_[static_cast<size_t>(type)]); | |||
} | |||
bool IsEnable() const { | |||
return enabled_ || GlobalProfilingWrapper::GetInstance()->GetEnableFlags(); | |||
} | |||
void SetEnable(bool enable_flag) { | |||
enabled_ = enable_flag; | |||
} | |||
void Clear() { | |||
subscribers_.clear(); | |||
for (auto &built_in_subscriber : built_in_subscribers_ptr_) { | |||
built_in_subscriber = nullptr; | |||
} | |||
enabled_ = false; | |||
} | |||
size_t GetSize() const { | |||
return subscribers_.size(); | |||
} | |||
private: | |||
ModelV2Executor *executor_{nullptr}; | |||
bool enabled_{false}; | |||
std::array<void *, static_cast<size_t>(BuiltInSubscriberType::kNum)> built_in_subscribers_ptr_; | |||
std::vector<ExecutorSubscriberGuarder> subscribers_; | |||
ExecutorSubscriber subscriber_wrapper_; | |||
}; | |||
} // namespace gert | |||
#endif // AIR_CXX_INC_FRAMEWORK_RUNTIME_EXECUTOR_SUBSCRIBERS_SCHEDULER_H_ |
@@ -0,0 +1,138 @@ | |||
/** | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2022. All rights reserved. | |||
* | |||
* 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 AIR_CXX_INC_FRAMEWORK_RUNTIME_SUBSCRIBER_GLOBAL_PROFILING_H_ | |||
#define AIR_CXX_INC_FRAMEWORK_RUNTIME_SUBSCRIBER_GLOBAL_PROFILING_H_ | |||
#include <algorithm> | |||
#include <memory> | |||
#include <unordered_map> | |||
#include "built_in_subscriber_definitions.h" | |||
#include "common/debug/ge_log.h" | |||
#include "framework/common/ge_visibility.h" | |||
#include "runtime/subscriber/executor_subscriber_c.h" | |||
namespace gert { | |||
struct ProfilingData { | |||
uint64_t name_idx; | |||
uint64_t type_idx; | |||
ExecutorEvent event; | |||
std::chrono::time_point<std::chrono::system_clock> timestamp; | |||
}; | |||
class GlobalProfiler { | |||
public: | |||
GlobalProfiler() = default; | |||
void Record(uint64_t name_idx, uint64_t type_idx, ExecutorEvent event, | |||
std::chrono::time_point<std::chrono::system_clock> timestamp) { | |||
auto index = count_++; | |||
if (index >= kProfilingDataCap) { | |||
return; | |||
} | |||
records_[index] = {name_idx, type_idx, event, timestamp}; | |||
} | |||
void Dump(std::ostream &out_stream, std::vector<std::string> &idx_to_str) const; | |||
size_t GetCount() const { | |||
return count_; | |||
} | |||
private: | |||
std::atomic<size_t> count_{0UL}; | |||
ProfilingData records_[kProfilingDataCap]; | |||
}; | |||
class VISIBILITY_EXPORT GlobalProfilingWrapper { | |||
public: | |||
static GlobalProfilingWrapper *GetInstance() { | |||
static GlobalProfilingWrapper global_prof_wrapper; | |||
return &global_prof_wrapper; | |||
} | |||
static void OnGlobalProfilingSwitch(void *ins, uint64_t enable_flags); | |||
void Init(uint64_t enable_flags); | |||
void Free() { | |||
global_profiler_.reset(nullptr); | |||
SetEnableFlags(0UL); | |||
} | |||
GlobalProfiler *GetGlobalProfiler() const { | |||
return global_profiler_.get(); | |||
} | |||
void SetEnableFlags(uint64_t enable_flags) { | |||
enable_flags_ = enable_flags; | |||
} | |||
uint64_t GetRecordCount() { | |||
if (global_profiler_ == nullptr) { | |||
return 0UL; | |||
} | |||
return global_profiler_->GetCount(); | |||
} | |||
uint64_t GetEnableFlags() const { | |||
return enable_flags_; | |||
} | |||
bool IsEnable(ProfilingType profiling_type) const { | |||
return enable_flags_ & BuiltInSubscriberUtil::EnableBit<ProfilingType>(profiling_type); | |||
} | |||
void DumpAndFree(std::ostream &out_stream) { | |||
Dump(out_stream); | |||
Free(); | |||
} | |||
void Dump(std::ostream &out_stream) { | |||
if (global_profiler_ != nullptr) { | |||
global_profiler_->Dump(out_stream, idx_to_str_); | |||
} | |||
} | |||
void Record(uint64_t name_idx, uint64_t type_idx, ExecutorEvent event, | |||
std::chrono::time_point<std::chrono::system_clock> timestamp) { | |||
if (global_profiler_ != nullptr) { | |||
global_profiler_->Record(name_idx, type_idx, event, timestamp); | |||
} | |||
} | |||
uint64_t RegisterString(const char *name) { | |||
const std::lock_guard<std::mutex> lk(register_mutex_); | |||
std::string str_name = name; | |||
const auto iter = std::find(idx_to_str_.begin(), idx_to_str_.end(), str_name); | |||
if (iter == idx_to_str_.end()) { | |||
idx_to_str_[str_idx_] = str_name; | |||
++str_idx_; | |||
if (str_idx_ >= idx_to_str_.size()) { | |||
idx_to_str_.resize(idx_to_str_.size() * kDouble); | |||
} | |||
return str_idx_ - 1UL; | |||
} else { | |||
return iter - idx_to_str_.begin(); | |||
} | |||
} | |||
private: | |||
GlobalProfilingWrapper(); | |||
private: | |||
std::unique_ptr<GlobalProfiler> global_profiler_{nullptr}; | |||
uint64_t enable_flags_{0UL}; | |||
uint64_t str_idx_{0UL}; | |||
std::vector<std::string> idx_to_str_; | |||
std::mutex register_mutex_; | |||
}; | |||
} // namespace gert | |||
#endif |
@@ -1 +1 @@ | |||
Subproject commit e4d1efc47349f13af1bcdb53ba408118779fc27e | |||
Subproject commit 17536092c004f6f9e08116939f4f49e1e11a99d3 |
@@ -27,12 +27,12 @@ typedef double float64_t; | |||
inline uint64_t PtrToValue(const void *ptr) | |||
{ | |||
return static_cast<const uint64_t>(reinterpret_cast<const uintptr_t>(ptr)); | |||
return static_cast<uint64_t>(reinterpret_cast<uintptr_t>(ptr)); | |||
} | |||
inline void *ValueToPtr(const uint64_t value) | |||
{ | |||
return reinterpret_cast<void *>(static_cast<const uintptr_t>(value)); | |||
return reinterpret_cast<void *>(static_cast<uintptr_t>(value)); | |||
} | |||
template<typename TI, typename TO> | |||
@@ -59,6 +59,7 @@ static const int32_t ACL_ERROR_RT_QUEUE_FULL = 207014; // queue | |||
static const int32_t ACL_ERROR_RT_REPEATED_INIT = 207015; // repeated init | |||
static const int32_t ACL_ERROR_RT_AIVEC_OVER_FLOW = 207016; // aivec over flow | |||
static const int32_t ACL_ERROR_RT_OVER_FLOW = 207017; // common over flow | |||
static const int32_t ACL_ERROR_RT_DEVIDE_OOM = 207018; // device oom | |||
static const int32_t ACL_ERROR_RT_INTERNAL_ERROR = 507000; // runtime internal error | |||
static const int32_t ACL_ERROR_RT_TS_ERROR = 507001; // ts internel error | |||
@@ -30,18 +30,18 @@ namespace ge { | |||
* @par Inputs: | |||
* Three required inputs and one optional inputs, including: | |||
* @li x: A 2D tensor of data type float32. | |||
* @li y: A 2D tensor of data type float32. | |||
* @li sum_square_x: An optional 2D tensor of data type float32. | |||
* @li x: A 2D tensor of data type float32. | |||
* @li y: A 2D tensor of data type float32. | |||
* @li sum_square_x: An optional 2D tensor of data type float32. | |||
* @li sum_square_y: A 2D tensor of data type float32. \n | |||
* @par Attributes: | |||
* use_actual_distance: Indicates whether to calculate the complete distance. \n | |||
* @par Outputs: | |||
* @li segment_sum: A tensor of data type float32. | |||
* @li segment_count: A tensor of data type float32. | |||
* @li k_mean_total_sum: A tensor of data type float32. | |||
* @li segment_sum: A tensor of data type float32. | |||
* @li segment_count: A tensor of data type float32. | |||
* @li k_mean_total_sum: A tensor of data type float32. | |||
*/ | |||
REG_OP(KMeansCentroids) | |||
.INPUT(x, TensorType({DT_FLOAT})) | |||
@@ -2549,5 +2549,32 @@ REG_OP(OptionalGetValue) | |||
.REQUIRED_ATTR(output_types, ListType) | |||
.REQUIRED_ATTR(output_shapes, ListListInt) | |||
.OP_END_FACTORY_REG(OptionalGetValue) | |||
/** | |||
* @brief User define function process. \n | |||
* @par Inputs: | |||
* @li x: A list of input tensor objects. It's a dynamic input. \n | |||
* @par Outputs: | |||
* @li y: A list of output tensor objects. It's a dynamic output. \n | |||
* @par Attributes: | |||
* @li bin_path: User's binary path. | |||
* @li func_name: User defined function name. | |||
* @li output_types: Types of outputs data. | |||
* @li output_shapes: Shapes of outputs data. | |||
* @li _flow_attr_process_node_engine_id: Default process node engine of FlowFunc. | |||
*/ | |||
REG_OP(FlowFunc) | |||
.DYNAMIC_INPUT(x, TensorType({DT_FLOAT, DT_FLOAT16, DT_INT8, \ | |||
DT_INT16, DT_UINT16, DT_UINT8, DT_INT32, DT_INT64, DT_UINT32, DT_UINT64, DT_BOOL, DT_DOUBLE})) | |||
.DYNAMIC_OUTPUT(y, TensorType({DT_FLOAT, DT_FLOAT16, DT_INT8, \ | |||
DT_INT16, DT_UINT16, DT_UINT8, DT_INT32, DT_INT64, DT_UINT32, DT_UINT64, DT_BOOL, DT_DOUBLE})) | |||
.REQUIRED_ATTR(bin_path, String) | |||
.REQUIRED_ATTR(func_name, String) | |||
.ATTR(output_shapes, ListListInt, {}) | |||
.REQUIRED_ATTR(output_types, ListType) | |||
.OP_END_FACTORY_REG(FlowFunc) | |||
} // namespace ge | |||
#endif // OPS_BUILT_IN_OP_PROTO_INC_DATA_FLOW_OPS_H_ |
@@ -48,29 +48,29 @@ REG_OP(AddN) | |||
.OP_END_FACTORY_REG(AddN) | |||
/** | |||
*@brief Calculates the reversed outputs of the function "maximum". | |||
* @brief Calculates the reversed outputs of the function "maximum". | |||
*@par Inputs: | |||
* @par Inputs: | |||
* Three inputs, including: | |||
*@li grads: A mutable Tensor. Must be one of the following types: | |||
* @li grads: A mutable Tensor. Must be one of the following types: | |||
* float16, float32, int32. | |||
*@li x1: A mutable Tensor of the same type as "grads". | |||
*@li x2: A mutable Tensor of the same type as "grads". \n | |||
* @li x1: A mutable Tensor of the same type as "grads". | |||
* @li x2: A mutable Tensor of the same type as "grads". \n | |||
*@par Attributes: | |||
*@li grad_x: An optional bool. Defaults to "True". | |||
* @par Attributes: | |||
* @li grad_x: An optional bool. Defaults to "True". | |||
* If "True", "y1" will be output. | |||
* If "False", "y1" will not be output. \n | |||
*@li grad_y: An optional bool. Defaults to "True". | |||
* @li grad_y: An optional bool. Defaults to "True". | |||
* If "True", "y2" will be output. | |||
* If "False", "y2" will not be output. \n | |||
*@par Outputs: | |||
*@li y1: A mutable Tensor. Has the same type as "grads". | |||
*@li y2: A mutable Tensor. Has the same type as "grads". \n | |||
* @par Outputs: | |||
* @li y1: A mutable Tensor. Has the same type as "grads". | |||
* @li y2: A mutable Tensor. Has the same type as "grads". \n | |||
*@par Third-party framework compatibility: | |||
* @par Third-party framework compatibility: | |||
* Compatible with the TensorFlow operator MaximumGrad. | |||
*/ | |||
REG_OP(MaximumGrad) | |||
@@ -84,29 +84,29 @@ REG_OP(MaximumGrad) | |||
.OP_END_FACTORY_REG(MaximumGrad) | |||
/** | |||
*@brief Calculates the reversed outputs of the function "minimum". | |||
* @brief Calculates the reversed outputs of the function "minimum". | |||
*@par Inputs: | |||
* @par Inputs: | |||
* Three inputs, including: | |||
*@li grads: A mutable Tensor. Must be one of the following types: | |||
* @li grads: A mutable Tensor. Must be one of the following types: | |||
* float16, float32, int32. | |||
*@li x1: A mutable Tensor of the same type as "grads". | |||
*@li x2: A mutable Tensor of the same type as "grads". \n | |||
* @li x1: A mutable Tensor of the same type as "grads". | |||
* @li x2: A mutable Tensor of the same type as "grads". \n | |||
*@par Attributes: | |||
*@li grad_x: An optional bool. Defaults to "True". | |||
* @par Attributes: | |||
* @li grad_x: An optional bool. Defaults to "True". | |||
* If "True", "y1" will be output. | |||
* If "False", "y1" will not be output. \n | |||
*@li grad_y: An optional bool. Defaults to "True". | |||
* @li grad_y: An optional bool. Defaults to "True". | |||
* If "True", "y2" will be output. | |||
* If "False", "y2" will not be output. \n | |||
*@par Outputs: | |||
*@li y1: A mutable Tensor. Has the same type as "grads". | |||
*@li y2: A mutable Tensor. Has the same type as "grads". \n | |||
* @par Outputs: | |||
* @li y1: A mutable Tensor. Has the same type as "grads". | |||
* @li y2: A mutable Tensor. Has the same type as "grads". \n | |||
*@par Third-party framework compatibility: | |||
* @par Third-party framework compatibility: | |||
* Compatible with the TensorFlow operator MinimumGrad. | |||
*/ | |||
REG_OP(MinimumGrad) | |||
@@ -552,16 +552,16 @@ REG_OP(Expint) | |||
.OP_END_FACTORY_REG(Expint) | |||
/** | |||
*@brief: Computes the reciprocal of "x". | |||
* @brief: Computes the reciprocal of "x". | |||
*@par Inputs: | |||
*x: A Tensor. Must be one of the following types: float16, float32, | |||
* @par Inputs: | |||
* x: A Tensor. Must be one of the following types: float16, float32, | |||
* int32, int64, double, complex64, complex128. \n | |||
*@par Outputs: | |||
*y: A Tensor. Must be one of the following type: float16, float32, int32. \n | |||
* @par Outputs: | |||
* y: A Tensor. Must be one of the following type: float16, float32, int32. \n | |||
*@par Third-party framework compatibility: | |||
* @par Third-party framework compatibility: | |||
* Compatible with the TensorFlow operator Inv. | |||
*/ | |||
REG_OP(Inv) | |||
@@ -570,19 +570,19 @@ REG_OP(Inv) | |||
.OP_END_FACTORY_REG(Inv) | |||
/** | |||
*@brief: Computes "x" reciprocal grad, dx = -1*dy*y*y, where, "y = 1/x", | |||
* @brief: Computes "x" reciprocal grad, dx = -1*dy*y*y, where, "y = 1/x", | |||
* and "dy" is the corresponding input gradient. | |||
*@par Inputs: | |||
* @par Inputs: | |||
* Two inputs, including: | |||
*@li x: A Tensor. Must be one of the following types: float16, float32, | |||
* @li x: A Tensor. Must be one of the following types: float16, float32, | |||
* int32, int8. | |||
*@li grad: A Tensor. Has the same type as "x". \n | |||
* @li grad: A Tensor. Has the same type as "x". \n | |||
*@par Outputs: | |||
*y: A Tensor, Has the same type as "x". \n | |||
* @par Outputs: | |||
* y: A Tensor, Has the same type as "x". \n | |||
*@par Third-party framework compatibility: | |||
* @par Third-party framework compatibility: | |||
* Compatible with the TensorFlow operator InvGrad. | |||
*/ | |||
REG_OP(InvGrad) | |||
@@ -634,27 +634,27 @@ REG_OP(Log1p) | |||
.OP_END_FACTORY_REG(Log1p) | |||
/** | |||
*@brief Returns element-wise remainder of division. | |||
* @brief Returns element-wise remainder of division. | |||
*@par Inputs: | |||
* @par Inputs: | |||
* Two inputs, including: | |||
*@li x1: A Tensor. Must be one of the following types: float16, float32, | |||
* @li x1: A Tensor. Must be one of the following types: float16, float32, | |||
* int32, int64, int8, uint8, double. | |||
*@li x2: A Tensor of the same type as "x1". \n | |||
* @li x2: A Tensor of the same type as "x1". \n | |||
*@par Outputs: | |||
*y: A Tensor. Has the same type as "x1". \n | |||
* @par Outputs: | |||
* y: A Tensor. Has the same type as "x1". \n | |||
*@attention Constraints: | |||
*@li x2: The input data does not support 0. | |||
*@li When NUM exceeds 2048 , the accuracy of operator cannot guarantee the | |||
* @attention Constraints: | |||
* @li x2: The input data does not support 0. | |||
* @li When NUM exceeds 2048 , the accuracy of operator cannot guarantee the | |||
* requirement of double thousandths in the mini form. | |||
*@li Due to different architectures, the calculation results of this operator | |||
* @li Due to different architectures, the calculation results of this operator | |||
* on NPU and CPU may be inconsistent. | |||
*@li If shape is expressed as (D1,D2... ,Dn), | |||
* @li If shape is expressed as (D1,D2... ,Dn), | |||
* then D1*D2... *DN<=1000000,n<=8. \n | |||
*@par Third-party framework compatibility: | |||
* @par Third-party framework compatibility: | |||
* Compatible with the TensorFlow operator Mod. | |||
*/ | |||
REG_OP(Mod) | |||
@@ -667,18 +667,18 @@ REG_OP(Mod) | |||
.OP_END_FACTORY_REG(Mod) | |||
/** | |||
*@brief Returns the truth value of (x != y) element-wise. | |||
* @brief Returns the truth value of (x != y) element-wise. | |||
*@par Inputs: | |||
* @par Inputs: | |||
* Two inputs, including: | |||
*@li x1: A Tensor. Must be one of the following types: float16, float32, int32, | |||
* @li x1: A Tensor. Must be one of the following types: float16, float32, int32, | |||
* int8, uint8, double, int16, int64, uint16, half, uint32, uint64. | |||
*@li x2: A Tensor of the same type as "x1". \n | |||
* @li x2: A Tensor of the same type as "x1". \n | |||
*@par Outputs: | |||
*y: A Tensor of type bool. \n | |||
* @par Outputs: | |||
* y: A Tensor of type bool. \n | |||
*@par Third-party framework compatibility: | |||
* @par Third-party framework compatibility: | |||
* Compatible with the TensorFlow operator NotEqual. | |||
*/ | |||
REG_OP(NotEqual) | |||
@@ -688,17 +688,17 @@ REG_OP(NotEqual) | |||
.OP_END_FACTORY_REG(NotEqual) | |||
/** | |||
*@brief Computes ndtri element-wise (y = sqrt(2) * erfinv(2 * x - 1)). | |||
* @brief Computes ndtri element-wise (y = sqrt(2) * erfinv(2 * x - 1)). | |||
*@par Inputs: | |||
* @par Inputs: | |||
* One input, including: \n | |||
*x: A Tensor. Must be one of the following types: bfloat16, float16, | |||
* x: A Tensor. Must be one of the following types: bfloat16, float16, | |||
* float32, double. \n | |||
*@par Outputs: | |||
*y: A Tensor. Has the same type and format as input "x". \n | |||
* @par Outputs: | |||
* y: A Tensor. Has the same type and format as input "x". \n | |||
*@par Third-party framework compatibility: | |||
* @par Third-party framework compatibility: | |||
* Compatible with the TensorFlow operator Ndtri. | |||
*/ | |||
REG_OP(Ndtri) | |||
@@ -726,21 +726,21 @@ REG_OP(Neg) | |||
.OP_END_FACTORY_REG(Neg) | |||
/** | |||
*@brief Returns x1/x2 element-wise for integer types. | |||
* @brief Returns x1/x2 element-wise for integer types. | |||
*@par Inputs: | |||
*@li x1: A Tensor. Must be one of the following types: | |||
* @par Inputs: | |||
* @li x1: A Tensor. Must be one of the following types: | |||
* float32, float16, int8, uint8, int32, int16, | |||
* uint16, double, int64, complex64, complex128. | |||
*@li x2: A Tensor of the same data type as "x1". \n | |||
* @li x2: A Tensor of the same data type as "x1". \n | |||
*@par Outputs: | |||
*y: A Tensor. Has the same type as "x1". | |||
* @par Outputs: | |||
* y: A Tensor. Has the same type as "x1". | |||
*@attention Constraints: | |||
* @attention Constraints: | |||
* Broadcasting is supported. \n | |||
*@par Third-party framework compatibility | |||
* @par Third-party framework compatibility | |||
* Compatible with the TensorFlow operator TruncateDiv. \n | |||
*/ | |||
@@ -1427,17 +1427,17 @@ REG_OP(RsqrtGrad) | |||
.OP_END_FACTORY_REG(RsqrtGrad) | |||
/** | |||
*@brief Computes hyperbolic sine of "x" element-wise. | |||
* @brief Computes hyperbolic sine of "x" element-wise. | |||
*@par Inputs: | |||
*x: An NCHW, NHWC,or ND Tensor of type float, double, complex64, | |||
* complex128, half. \n | |||
* @par Inputs: | |||
* x: An NCHW, NHWC,or ND Tensor of type float, double, complex64, | |||
* complex128, half. \n | |||
*@par Outputs: | |||
*y: A NCHW, NHWC,or ND Tensor of type float, double, complex64, | |||
* complex128, half. \n | |||
* @par Outputs: | |||
* y: A NCHW, NHWC,or ND Tensor of type float, double, complex64, | |||
* complex128, half. \n | |||
*@par Third-party framework compatibility | |||
* @par Third-party framework compatibility | |||
* Compatible with the TensorFlow operator Sinh. \n | |||
*/ | |||
@@ -1513,18 +1513,18 @@ REG_OP(DivNoNan) | |||
.OP_END_FACTORY_REG(DivNoNan) | |||
/** | |||
*@brief Reverses specific dimensions of a tensor. | |||
* @brief Reverses specific dimensions of a tensor. | |||
*@par Inputs: | |||
* @par Inputs: | |||
* One input: \n | |||
*x: A Tensor, Must be one of the following types: | |||
* x: A Tensor, Must be one of the following types: | |||
* int32, uint8, int16, int8, int64, int64, uint16, uint32, uint64, | |||
* and format can be [NCHW,NHWC,ND]. \n | |||
*@par Outputs: | |||
*y: A Tensor. Has the same type and format as "x". \n | |||
* @par Outputs: | |||
* y: A Tensor. Has the same type and format as "x". \n | |||
*@par Third-party framework compatibility: | |||
* @par Third-party framework compatibility: | |||
* Compatible with the TensorFlow operator Invert. | |||
*/ | |||
REG_OP(Invert) | |||
@@ -1772,16 +1772,16 @@ REG_OP(Atan2) | |||
.OP_END_FACTORY_REG(Atan2) | |||
/** | |||
*@brief Computes fresnel_cos of x element-wise. | |||
* @brief Computes fresnel_cos of x element-wise. | |||
* | |||
*@par Inputs: | |||
*x: A tensor. Must be one of the following types: bfloat16, float16, float32, | |||
* @par Inputs: | |||
* x: A tensor. Must be one of the following types: bfloat16, float16, float32, | |||
* double. \n | |||
* | |||
*@par Outputs: | |||
*y: A tensor. Has the same type as "x". \n | |||
* @par Outputs: | |||
* y: A tensor. Has the same type as "x". \n | |||
* | |||
*@par Third-party framework compatibility | |||
* @par Third-party framework compatibility | |||
* Compatible with the TensorFlow operator FresnelCos. | |||
* | |||
*/ | |||
@@ -1791,17 +1791,17 @@ REG_OP(FresnelCos) | |||
.OP_END_FACTORY_REG(FresnelCos) | |||
/** | |||
*@brief Computes fresnel_sin of x element-wise. | |||
* @brief Computes fresnel_sin of x element-wise. | |||
* | |||
*@par Inputs: | |||
*x: A tensor. Must be one of the following types: bfloat16, float16, float32, | |||
* @par Inputs: | |||
* x: A tensor. Must be one of the following types: bfloat16, float16, float32, | |||
* double. \n | |||
* | |||
*@par Outputs: | |||
*y: A tensor. Has the same type as "x". \n | |||
* @par Outputs: | |||
* y: A tensor. Has the same type as "x". \n | |||
* | |||
*@par Third-party framework compatibility: | |||
* @par Third-party framework compatibility: | |||
* Compatible with the TensorFlow operator FresnelSin. | |||
* | |||
*/ | |||
@@ -2317,16 +2317,16 @@ REG_OP(Sin) | |||
.OP_END_FACTORY_REG(Sin) | |||
/** | |||
*@brief: Computes tan of "x" element-wise. | |||
* @brief: Computes tan of "x" element-wise. | |||
*@par Inputs: | |||
*One input: | |||
*x: A Tensor. Must be one of the following types: float16, float32, double, complex64, complex128, int32, int64 | |||
* @par Inputs: | |||
* One input: | |||
* x: A Tensor. Must be one of the following types: float16, float32, double, complex64, complex128, int32, int64 | |||
*@par Outputs: | |||
*y: A Tensor. Has the same type as "x". \n | |||
* @par Outputs: | |||
* y: A Tensor. Has the same type as "x". \n | |||
*@par Third-party framework compatibility | |||
* @par Third-party framework compatibility | |||
* Compatible with TensorFlow operator Tan. | |||
*/ | |||
REG_OP(Tan) | |||
@@ -2337,27 +2337,27 @@ REG_OP(Tan) | |||
.OP_END_FACTORY_REG(Tan) | |||
/** | |||
*@brief Returns element-wise remainder of division. | |||
* @brief Returns element-wise remainder of division. | |||
*@par Inputs: | |||
*Two inputs, including: | |||
* @par Inputs: | |||
* Two inputs, including: | |||
* @li x1: A Tensor. Must be one of the following types: float16, float32, | |||
* double, int32, int64. | |||
* @li x2: A Tensor of the same type as "x1". \n | |||
*@par Outputs: | |||
*y: A Tensor. Has the same type as "x1". \n | |||
* @par Outputs: | |||
* y: A Tensor. Has the same type as "x1". \n | |||
*@attention Constraints: | |||
*@li x2: The input data does not support 0 | |||
*@li When NUM exceeds 2048 , the accuracy of operator cannot guarantee the | |||
*requirement of double thousandths in the mini form | |||
*@li Due to different architectures, the calculation results of this operator | |||
*on NPU and CPU may be inconsistent | |||
*@li If shape is expressed as (D1,D2... ,Dn), then D1*D2... *DN<=1000000,n<=8 | |||
* @attention Constraints: | |||
* @li x2: The input data does not support 0 | |||
* @li When NUM exceeds 2048 , the accuracy of operator cannot guarantee the | |||
* requirement of double thousandths in the mini form | |||
* @li Due to different architectures, the calculation results of this operator | |||
* on NPU and CPU may be inconsistent | |||
* @li If shape is expressed as (D1,D2... ,Dn), then D1*D2... *DN<=1000000,n<=8 | |||
*@par Third-party framework compatibility | |||
*Compatible with the TensorFlow operator TruncateMod. | |||
* @par Third-party framework compatibility | |||
* Compatible with the TensorFlow operator TruncateMod. | |||
*/ | |||
REG_OP(TruncateMod) | |||
.INPUT(x1, TensorType({DT_FLOAT16, DT_FLOAT, DT_DOUBLE, DT_INT64, | |||
@@ -3138,21 +3138,21 @@ REG_OP(SquareSumV2) | |||
.OP_END_FACTORY_REG(SquareSumV2) | |||
/** | |||
*@brief Confuse reducesumd and square. | |||
* @brief Confuse reducesumd and square. | |||
*@par Inputs: | |||
*x: A Tensor of type float16, float32. \n | |||
* @par Inputs: | |||
* x: A Tensor of type float16, float32. \n | |||
*@par Attributes: | |||
* @par Attributes: | |||
* Two attributes, including: \n | |||
*@li axis: A optional listint, specifies the dimensions to reduce. | |||
*@li keep_dims: A bool, specifying whether to keep dimensions for the output Tensor. Defaults to "false". \n | |||
* @li axis: A optional listint, specifies the dimensions to reduce. | |||
* @li keep_dims: A bool, specifying whether to keep dimensions for the output Tensor. Defaults to "false". \n | |||
*@par Outputs: | |||
y: A Tensor. Has the same type as "x". | |||
* @par Outputs: | |||
* y: A Tensor. Has the same type as "x". | |||
*@par Restrictions: | |||
*Warning: THIS FUNCTION IS EXPERIMENTAL. Please do not use. | |||
* @par Restrictions: | |||
* Warning: THIS FUNCTION IS EXPERIMENTAL. Please do not use. | |||
*/ | |||
REG_OP(SquareSumV1) | |||
.INPUT(x, TensorType({DT_FLOAT16,DT_FLOAT})) | |||
@@ -3183,19 +3183,19 @@ REG_OP(SquareSumAll) | |||
.OP_END_FACTORY_REG(SquareSumAll) | |||
/** | |||
*@brief Confuse broadcast, addn and mul. | |||
* @brief Confuse broadcast, addn and mul. | |||
*@par Inputs: | |||
*Three inputs, including: | |||
*@li x1: A Tensor. Must be one of the following types:int32, int16, | |||
* @par Inputs: | |||
* Three inputs, including: | |||
* @li x1: A Tensor. Must be one of the following types:int32, int16, | |||
* float16, float32. | |||
*@li x2: A Tensor of the same type as "x1". | |||
*@li x3: A Tensor of the same type as "x1". \n | |||
* @li x2: A Tensor of the same type as "x1". | |||
* @li x3: A Tensor of the same type as "x1". \n | |||
*@par Outputs: | |||
*y: A Tensor. Has the same type as "x1". \n | |||
* @par Outputs: | |||
* y: A Tensor. Has the same type as "x1". \n | |||
*@par Restrictions: | |||
* @par Restrictions: | |||
* Warning: THIS FUNCTION IS EXPERIMENTAL. Please do not use. | |||
*/ | |||
REG_OP(FusedMulAddN) | |||
@@ -3206,41 +3206,41 @@ REG_OP(FusedMulAddN) | |||
.OP_END_FACTORY_REG(FusedMulAddN) | |||
/** | |||
*@brief Add 'bias' to 'x'. | |||
* @brief Add 'bias' to 'x'. | |||
*@par Inputs: | |||
* @par Inputs: | |||
* Two inputs, including: | |||
*@li x: An ND tensor of type float16 or float32. | |||
*@li bias: An ND tensor of type float16 or float32. \n | |||
* @li x: An ND tensor of type float16 or float32. | |||
* @li bias: An ND tensor of type float16 or float32. \n | |||
*@par Attributes: | |||
*@li axis: An optional int32 used to compute the shape of bias input from the online bottoms. Defaults to "1". | |||
*@li num_axes: An optional int32 used to compute the shape of | |||
* @par Attributes: | |||
* @li axis: An optional int32 used to compute the shape of bias input from the online bottoms. Defaults to "1". | |||
* @li num_axes: An optional int32 used to compute the shape of | |||
* bias input from a Caffe model trained offline. Defaults to "1". | |||
*@li bias_from_blob: An optional bool. If "true", bias is input from a Caffe model trained offline. | |||
* @li bias_from_blob: An optional bool. If "true", bias is input from a Caffe model trained offline. | |||
* If "false", bias is input from online bottoms. Defaults to "true". \n | |||
*@par Outputs: | |||
*y: An ND tensor of type float16 or float32. \n | |||
* @par Outputs: | |||
* y: An ND tensor of type float16 or float32. \n | |||
*@attention Constraints: | |||
* @attention Constraints: | |||
* Assume that the shape length of "x" is "n" and that of "bias" is "m". | |||
*@li "axis" is within the range [-n, n-1]. num_axes >= -1. | |||
*@li If "bias_from_blob = true", "num_axes = -1", and "axis >= 0", | |||
* @li "axis" is within the range [-n, n-1]. num_axes >= -1. | |||
* @li If "bias_from_blob = true", "num_axes = -1", and "axis >= 0", | |||
* the ith axis of "bias" and the (i+"axis")th axis of "x" must have the same size (0 <= i < n-axis). | |||
* If "axis < 0", the ith axis of "bias" and the (i+n+"axis")th axis of "x" must have the same size (0 <= i < -axis). | |||
*@li If "bias_from_blob = true" and "num_axes = 0", "bias" is a scalar with shape length 1 and dimension size 1. | |||
*@li If "bias_from_blob = true", "num_axes > 0, and "axis >= 0", | |||
* @li If "bias_from_blob = true" and "num_axes = 0", "bias" is a scalar with shape length 1 and dimension size 1. | |||
* @li If "bias_from_blob = true", "num_axes > 0, and "axis >= 0", | |||
* "axis + num_axes" must be less than or equal to "n" and the ith axis of "bias" and | |||
* the (i+"axis")th axis of "x" must have the same size (0 <= i < num_axes). | |||
* If "axis < 0", "n + axis + num_axes" must be less than or equal to "n" and | |||
* the ith axis of "bias" and the (i+n+"axis")th axis of "x" must have the same size (0 <= i < num_axes). | |||
*@li If "bias_from_blob = false", "bias" is not a scalar, and "axis >= 0", | |||
* @li If "bias_from_blob = false", "bias" is not a scalar, and "axis >= 0", | |||
* "axis + m" must be less than or equal to "n" and the ith axis of "bias" and | |||
* the (i+"axis")th axis of "x" must have the same size (0 <= i < m). | |||
* If "axis < 0", "n + axis + m" must be less than or equal to "n" and | |||
* the ith axis of "bias" and the (i+n+"axis")th axis of "x" must have the same size (0 <= i < m). \n | |||
*@par Third-party framework compatibility | |||
* @par Third-party framework compatibility | |||
* Compatible with the Caffe operator Bias. | |||
*/ | |||
@@ -3383,7 +3383,7 @@ REG_OP(Muls) | |||
*@par Inputs: | |||
*One input, including: | |||
*x1: A Tensor. Must be one of the following types:int32,int16, float16, float32. | |||
*x: A Tensor. Must be one of the following types:float32, float16, int64, int32, int16, bool. | |||
*@par Outputs: | |||
*y: A Tensor. Has the same type and shape as "x1". \n | |||
@@ -3392,9 +3392,9 @@ REG_OP(Muls) | |||
* Compatible with the Pytorch operator fills. | |||
*/ | |||
REG_OP(Fills) | |||
.INPUT(x, TensorType({DT_FLOAT,DT_INT16,DT_INT32,DT_FLOAT16})) | |||
.OUTPUT(y, TensorType({DT_FLOAT,DT_INT16,DT_INT32,DT_FLOAT16})) | |||
.REQUIRED_ATTR(value,Float) | |||
.INPUT(x, TensorType({DT_FLOAT, DT_FLOAT16, DT_INT64, DT_INT32, DT_INT16, DT_BOOL})) | |||
.OUTPUT(y, TensorType({DT_FLOAT, DT_FLOAT16, DT_INT64, DT_INT32, DT_INT16, DT_BOOL})) | |||
.REQUIRED_ATTR(value, Float) | |||
.OP_END_FACTORY_REG(Fills) | |||
/** | |||
@@ -3420,19 +3420,19 @@ REG_OP(Fills) | |||
.OP_END_FACTORY_REG(Adds) | |||
/** | |||
*@brief Computes the product of x and y and returns 0 if the y is zero, | |||
* @brief Computes the product of x and y and returns 0 if the y is zero, | |||
* even if x is NaN or infinite. | |||
*@par Inputs: | |||
* @par Inputs: | |||
* Two inputs, including: \n | |||
*@li x1: A Tensor. Must be one of the following types:float16, float32, | |||
* @li x1: A Tensor. Must be one of the following types:float16, float32, | |||
* double, complex64, complex128. | |||
*@li x2: A Tensor. Has the same type and shape as "x1". \n | |||
* @li x2: A Tensor. Has the same type and shape as "x1". \n | |||
*@par Outputs: | |||
*y: A Tensor. Has the same type and shape as "x1". \n | |||
* @par Outputs: | |||
* y: A Tensor. Has the same type and shape as "x1". \n | |||
*@par Third-party framework compatibility: | |||
* @par Third-party framework compatibility: | |||
* Compatible with the TensorFlow operator MulNoNan. | |||
*/ | |||
REG_OP(MulNoNan) | |||
@@ -0,0 +1,158 @@ | |||
/** | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. All rights reserved. | |||
* | |||
* 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. | |||
*/ | |||
/*! | |||
* \file experiment_ops.h | |||
* \brief | |||
*/ | |||
#ifndef OPS_BUILT_IN_OP_PROTO_INC_EXPERIMENT_OPS_H_ | |||
#define OPS_BUILT_IN_OP_PROTO_INC_EXPERIMENT_OPS_H_ | |||
#include "graph/operator_reg.h" | |||
namespace ge { | |||
/** | |||
* @brief Updates "var" according to the AdamW algorithm. | |||
* | |||
* @attention Constraints: | |||
* The input tensors must have the same shape.* | |||
* | |||
* @par Inputs: | |||
* @li var: A mutable Tensor of the type TensorType::NumberType(). | |||
* Should be from a Variable(). | |||
* @li m: A mutable Tensor of the same type as "var". | |||
* Should be from a Variable(). | |||
* @li v: A mutable Tensor of the same type as "var". | |||
* Should be from a Variable(). | |||
* @li beta1_power: A scalar of the same type as "var". | |||
* @li beta2_power: A scalar of the same type as "var". | |||
* @li lr: learning_rate. A scalar of the same type as "var". | |||
* @li weight_decay: learning_rate. A scalar of the same type as "var". | |||
* @li beta1: A scalar of the same type as "var". | |||
* @li beta2: A scalar of the same type as "var". | |||
* @li epsilon: A scalar of the same type as "var". | |||
* @li grad: A Tensor of the same type as "var", for the gradient. | |||
* @li max_grad_norm: A mutable Tensor of the same type as "var", an optional input. | |||
* Should be from a Variable(). | |||
* | |||
* @par Attributes: | |||
* @li amsgrad: An optional bool. Defaults to "False". | |||
* If "True", max_grad_norm input and output must be entered. | |||
* @li maximize: An optional bool. Defaults to "False". | |||
* | |||
* @par Outputs: | |||
* @li var: A mutable tensor. Has the same type as input "var". | |||
* @li m: A mutable tensor. Has the same type as input "m". | |||
* @li v: A mutable tensor. Has the same type as input "v". \n | |||
*/ | |||
REG_OP(ApplyAdamW) | |||
.INPUT(var, TensorType::NumberType()) | |||
.INPUT(m, TensorType::NumberType()) | |||
.INPUT(v, TensorType::NumberType()) | |||
.INPUT(beta1_power, TensorType::NumberType()) | |||
.INPUT(beta2_power, TensorType::NumberType()) | |||
.INPUT(lr, TensorType::NumberType()) | |||
.INPUT(weight_decay, TensorType::NumberType()) | |||
.INPUT(beta1, TensorType::NumberType()) | |||
.INPUT(beta2, TensorType::NumberType()) | |||
.INPUT(epsilon, TensorType::NumberType()) | |||
.INPUT(grad, TensorType::NumberType()) | |||
.OPTIONAL_INPUT(max_grad_norm, TensorType::NumberType()) | |||
.OUTPUT(var, TensorType::NumberType()) | |||
.OUTPUT(m, TensorType::NumberType()) | |||
.OUTPUT(v, TensorType::NumberType()) | |||
.ATTR(amsgrad, Bool, false) | |||
.ATTR(maximize, Bool, false) | |||
.OP_END_FACTORY_REG(ApplyAdamW) | |||
/** | |||
* @brief Multiplies matrix "a" by matrix "b", producing "a * b". \n | |||
* @par Inputs: | |||
* Four inputs, including: | |||
* @li x1: A matrix Tensor. Must be one of the following types: float32, | |||
* float16, int32, int8, int4, bf16. 3D. Has format ND. | |||
* @li x2: A matrix Tensor. Must be one of the following types: float32, | |||
* float16, int32, int8, int4, bf16. 3D. Has format ND. | |||
* @li bias: A optional Tensor. Must be one of the following types: | |||
* float32, float16, int32, bf16. 1D. Has format ND. | |||
* @li offset_w: A optional Tensor. Must be one of the following types: | |||
* int8, int4. Has format ND. \n | |||
* @par Attributes: | |||
* Three attributes, including: | |||
* @li perm_x1: A list int. "x1" is permuted to shape [B, M, K] before multiplication. | |||
* @li perm_x2: A list int. "x2" is permuted to shape [B, K, N] before multiplication. | |||
* @li perm_y: A list int. "y" is permuted after multiplication. | |||
* @li offset_x: An optional integer for quantized TransposeBatchMatMul. | |||
* The negative offset added to the input "x1" for int8, int4 type. Ensure offset_x | |||
* within the effective range of input data type. Defaults to "0". \n | |||
* @par Outputs: | |||
* y: The result matrix Tensor. 3D. Must be one of the following | |||
* types: float32, float16, int32, bf16. 3D. Has format ND. \n | |||
*/ | |||
REG_OP(TransposeBatchMatMul) | |||
.INPUT(x1, TensorType({DT_FLOAT, DT_FLOAT16, DT_INT32, DT_INT8, DT_INT4, DT_BF16})) | |||
.INPUT(x2, TensorType({DT_FLOAT, DT_FLOAT16, DT_INT32, DT_INT8, DT_INT4, DT_BF16})) | |||
.OPTIONAL_INPUT(bias, TensorType({DT_FLOAT, DT_FLOAT16, DT_INT32, DT_BF16})) | |||
.OPTIONAL_INPUT(offset_w, TensorType({DT_INT8, DT_INT4})) | |||
.OUTPUT(y, TensorType({DT_FLOAT, DT_FLOAT16, DT_INT32, DT_BF16})) | |||
.ATTR(perm_x1, ListInt, {}) | |||
.ATTR(perm_x2, ListInt, {}) | |||
.ATTR(perm_y, ListInt, {}) | |||
.ATTR(offset_x, Int, 0) | |||
.OP_END_FACTORY_REG(TransposeBatchMatMul) | |||
/** | |||
* @brief Performs non-maximum suppression (NMS) on the rotated boxes according | |||
* to their intersection-over-union (IoU). Rotated NMS interatively removes lower | |||
* scoring rotated boxes which have an IoU greater than iou_threshold with | |||
* another (higher scoring) rotated box. | |||
* @par Inputs: | |||
* Three inputs, including: | |||
* @li boxes: A 2D Tensor of float16 or float32 with shape (N, 5). Rotated boxes to | |||
* perform NMS on. They are expected to be in (x1, y1, x2, y2, angle_degress) format. | |||
* @li scores: A 1D Tensor of float16 or float32 with shape (N). Scores for each one of | |||
* the rotated boxes. | |||
* @li labels: A 1D Tensor of int32 or int64 with shape (N). Labels for each one of | |||
* the rotated boxes. | |||
* @par Attributes: | |||
* iou_threshold: A required float attribute. Discards all overlapping rotated | |||
* boxes with IoU < iou_threshold. | |||
* @par Outputs: | |||
* Two outputs, including: | |||
* @li selected_detections: A 2D Tensor of float16 or float32 with shape (N, 5). | |||
* The selected boxes that kept by Rotated NMS, sorted in decreasing order of scores. | |||
* @li keep_indices: A 1D Tensor of int32 or int64 with shape (N). The indices of | |||
* selected_detections. | |||
* @attention Constraints: | |||
* Currently, the tensor type of input (boxes, scores) only support float. | |||
* The tensor type of keep_indices only support int32. | |||
*/ | |||
REG_OP(RotatedNMS) | |||
.INPUT(boxes, TensorType({DT_FLOAT16, DT_FLOAT})) | |||
.INPUT(scores, TensorType({DT_FLOAT16, DT_FLOAT})) | |||
.INPUT(labels, TensorType({DT_INT32, DT_INT64})) | |||
.OUTPUT(selected_detections, TensorType({DT_FLOAT16, DT_FLOAT})) | |||
.OUTPUT(keep_indices, TensorType({DT_INT32, DT_INT64})) | |||
.REQUIRED_ATTR(iou_threshold, Float) | |||
.OP_END_FACTORY_REG(RotatedNMS) | |||
} // namespace ge | |||
#endif // OPS_BUILT_IN_OP_PROTO_INC_EXPERIMENT_OPS_H_ |
@@ -362,6 +362,59 @@ REG_OP(ToBool) | |||
.OUTPUT(output, DT_BOOL) | |||
.OP_END_FACTORY_REG(ToBool) | |||
/** | |||
* @brief Abstract tiling function to an op definition | |||
* The input will be data or shape \n | |||
* @par Inputs: | |||
* @li x: the data of input. all types are available, | |||
* @li outputshape: the shape of previous op output shape . all types are available. \n | |||
* @par Outputs: | |||
* @li tiling_data: tiling data of tiling function. It should be a buffer | |||
* @li tiling_key: tiling key of tiling function. | |||
* @li block_dim: block dim of tiling function. | |||
* @li tiling_cond: tiling condition of tiling function which will be used to determined real execute kernel. \n | |||
* @par Attributes: | |||
* @li tiling_node: A string. real tiling node such as matmul. | |||
* @li op_type: A string. Op type of the original node. \n | |||
* @par Third-party framework compatibility | |||
*/ | |||
REG_OP(OpTiling) | |||
.DYNAMIC_INPUT(x, TensorType::ALL()) | |||
.DYNAMIC_INPUT(output_shape, TensorType::ALL()) | |||
.OUTPUT(tiling_data, TensorType({DT_UINT8})) | |||
.OUTPUT(tiling_key, TensorType({DT_UINT64})) | |||
.OUTPUT(block_dim, TensorType({DT_INT32})) | |||
.OUTPUT(tiling_cond, TensorType({DT_INT32})) | |||
.REQUIRED_ATTR(tiling_node, String) | |||
.REQUIRED_ATTR(op_type, String) | |||
.OP_END_FACTORY_REG(OpTiling) | |||
/** | |||
* @brief Calculate condition value by input tensor which will be used for if input or case input. \n | |||
* @par Inputs: | |||
* @li x: the data or shape of input. all types are available, | |||
* @par Outputs: | |||
* @li cond: condition value calculated by cond fuction. | |||
It will be cond input of if or branch_index input of case. \n | |||
* @par Attributes: | |||
* @li cond_func: A string. real condition function registered to calculate condition value. | |||
* @li x_dependency: List of int. It should be the same number of inputs: 0(shape) 1(data). \n | |||
* @par Third-party framework compatibility | |||
*/ | |||
REG_OP(ConditionCalc) | |||
.DYNAMIC_INPUT(x, TensorType::ALL()) | |||
.OUTPUT(cond, TensorType({DT_INT32})) | |||
.REQUIRED_ATTR(cond_func, String) | |||
.REQUIRED_ATTR(x_dependency, ListInt) | |||
.OP_END_FACTORY_REG(ConditionCalc) | |||
} // namespace ge | |||
#endif // OPS_BUILT_IN_OP_PROTO_INC_FUNCTIONAL_OPS_H_ |
@@ -28,7 +28,7 @@ namespace ge { | |||
* @brief Outputs a tensor gathering all input tensors. | |||
* @par Inputs: | |||
* x: A tensor. Must be one of the following types: int8, int16, int32, float16, | |||
float32. | |||
float32, uint8, uint16, uint32, float64. | |||
* @par Attributes: | |||
* @li rank_size: A required integer identifying the number of ranks | |||
participating in the op. | |||
@@ -41,8 +41,10 @@ namespace ge { | |||
as the name of a world group. | |||
*/ | |||
REG_OP(HcomAllGather) | |||
.INPUT(x, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64})) | |||
.OUTPUT(y, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64})) | |||
.INPUT(x, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64, | |||
DT_UINT8, DT_UINT16, DT_UINT32, DT_FLOAT64})) | |||
.OUTPUT(y, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64, | |||
DT_UINT8, DT_UINT16, DT_UINT32, DT_FLOAT64})) | |||
.REQUIRED_ATTR(rank_size, Int) | |||
.REQUIRED_ATTR(group, String) | |||
.OP_END_FACTORY_REG(HcomAllGather) | |||
@@ -99,8 +101,10 @@ REG_OP(HcomAllReduce) | |||
as the name of a world group. | |||
*/ | |||
REG_OP(HcomBroadcast) | |||
.DYNAMIC_INPUT(x, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64})) | |||
.DYNAMIC_OUTPUT(y, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64})) | |||
.DYNAMIC_INPUT(x, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64, | |||
DT_UINT8, DT_UINT16, DT_UINT32, DT_FLOAT64})) | |||
.DYNAMIC_OUTPUT(y, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64, | |||
DT_UINT8, DT_UINT16, DT_UINT32, DT_FLOAT64})) | |||
.REQUIRED_ATTR(root_rank, Int) | |||
.REQUIRED_ATTR(group, String) | |||
.ATTR(fusion, Int, 0) | |||
@@ -186,7 +190,8 @@ REG_OP(HcomReduceScatter) | |||
* @see HcomReceive | |||
*/ | |||
REG_OP(HcomSend) | |||
.INPUT(x, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64})) | |||
.INPUT(x, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64, | |||
DT_UINT8, DT_UINT16, DT_UINT32, DT_FLOAT64})) | |||
.REQUIRED_ATTR(group, String) | |||
.REQUIRED_ATTR(sr_tag, Int) | |||
.REQUIRED_ATTR(dest_rank, Int) | |||
@@ -217,7 +222,8 @@ REG_OP(HcomSend) | |||
* @see HcomSend | |||
*/ | |||
REG_OP(HcomReceive) | |||
.OUTPUT(y, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64})) | |||
.OUTPUT(y, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64, | |||
DT_UINT8, DT_UINT16, DT_UINT32, DT_FLOAT64})) | |||
.REQUIRED_ATTR(group, String) | |||
.REQUIRED_ATTR(sr_tag, Int) | |||
.REQUIRED_ATTR(src_rank, Int) | |||
@@ -303,12 +309,14 @@ REG_OP(HcomRemoteScatterWrite) | |||
using the RDMA. | |||
*/ | |||
REG_OP(HcomAllToAllV) | |||
.INPUT(send_data, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64})) | |||
.INPUT(send_data, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64, | |||
DT_UINT8, DT_UINT16, DT_UINT32, DT_FLOAT64})) | |||
.INPUT(send_counts, TensorType({DT_INT64})) | |||
.INPUT(send_displacements, TensorType({DT_INT64})) | |||
.INPUT(recv_counts, TensorType({DT_INT64})) | |||
.INPUT(recv_displacements, TensorType({DT_INT64})) | |||
.OUTPUT(recv_data, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64})) | |||
.OUTPUT(recv_data, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64, | |||
DT_UINT8, DT_UINT16, DT_UINT32, DT_FLOAT64})) | |||
.REQUIRED_ATTR(group, String) | |||
.OP_END_FACTORY_REG(HcomAllToAllV) | |||
@@ -345,8 +353,10 @@ REG_OP(HcomGatherAllToAllV) | |||
.INPUT(addrinfo_count_per_rank, TensorType({DT_INT64})) | |||
.INPUT(recv_counts, TensorType({DT_INT64})) | |||
.INPUT(recv_displacements, TensorType({DT_INT64})) | |||
.OUTPUT(recv_data, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64})) | |||
.OUTPUT(gathered, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64})) | |||
.OUTPUT(recv_data, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64, | |||
DT_UINT8, DT_UINT16, DT_UINT32, DT_FLOAT64})) | |||
.OUTPUT(gathered, TensorType({DT_FLOAT, DT_INT32, DT_INT8, DT_INT16, DT_FLOAT16, DT_INT64, DT_UINT64, | |||
DT_UINT8, DT_UINT16, DT_UINT32, DT_FLOAT64})) | |||
.REQUIRED_ATTR(group, String) | |||
.REQUIRED_ATTR(dtype, Type) | |||
.REQUIRED_ATTR(addr_length, Int) | |||
@@ -2371,5 +2371,78 @@ REG_OP(ImageProjectiveTransform) | |||
.ATTR(fill_mode, String, "CONSTANT") | |||
.OUTPUT(transformed_images, TensorType({DT_UINT8, DT_INT32, DT_INT64, DT_FLOAT16, DT_FLOAT, DT_DOUBLE})) | |||
.OP_END_FACTORY_REG(ImageProjectiveTransform) | |||
/** | |||
* @brief image to transforms. \n | |||
* @par Inputs: | |||
* @li images: [batch, height, width, channels], 4-D tensor. | |||
* @li transforms: [batch, 8] or [1, 8] matrix, 2-D tensor. | |||
* @li outout_shape: [new_height, new_width], 1-D tensor. | |||
* @li fill_value: [scalar], 1-D tensor. | |||
* @par Attributes: | |||
* @li interpolation: Interpolation method, "NEAREST" or "BILINEAR", 0-D tensor. | |||
* @li fill_mode: Defaults to "CONSTANT". Fill mode, "REFLECT", "WRAP", or "CONSTANT", 0-D tensor. | |||
* @par Outputs | |||
* transformed_images: has the same type as iamges, 4-D tensor with shape[batch, new_height, new_width, channels]. \n | |||
* @par Third-party framework compatibility. | |||
* Compatible with tensorflow ImageProjectiveTransformv2 operator. | |||
*/ | |||
REG_OP(ImageProjectiveTransformV2) | |||
.INPUT(images, TensorType({DT_UINT8, DT_INT32, DT_INT64, DT_FLOAT16, DT_FLOAT, DT_DOUBLE})) | |||
.INPUT(transforms, TensorType({DT_FLOAT})) | |||
.INPUT(output_shape, TensorType({DT_INT32})) | |||
.OPTIONAL_INPUT(fill_value, TensorType({DT_UINT8, DT_INT32, DT_INT64, DT_FLOAT16, DT_FLOAT, DT_DOUBLE})) | |||
.REQUIRED_ATTR(interpolation, String) | |||
.ATTR(fill_mode, String, "CONSTANT") | |||
.OUTPUT(transformed_images, TensorType({DT_UINT8, DT_INT32, DT_INT64, DT_FLOAT16, DT_FLOAT, DT_DOUBLE})) | |||
.OP_END_FACTORY_REG(ImageProjectiveTransformV2) | |||
/** | |||
* @brief Extracts a glimpse from the input tensor . \n | |||
* @par Inputs: | |||
* Input input must be a 4-D tensor. Inputs include: | |||
* @li input: A 4-D float tensor of shape [batch_size, height, width, channels]. | |||
The format must be NHWC. | |||
* @li size: A 1-D tensor of 2 elements containing the size of the glimpses to | |||
extract. The glimpse height must be specified first, following by the glimpse | |||
width. | |||
* @li offsets: A 2-D integer tensor of shape [batch_size, 2] containing the y, | |||
x locations of the center of each window . \n | |||
* @par Attributes: | |||
* @li centered: indicates if the offset coordinates are centered relative to | |||
the image, in which case the (0, 0) offset is relative to the center of the | |||
input images. If false, the (0,0) offset corresponds to the upper left corner | |||
of the input images. | |||
* @li normalized: indicates if the offset coordinates are normalized. | |||
* @li uniform_noise: indicates if the noise should be generated using a | |||
uniform distribution or a Gaussian distribution. | |||
* @li noise: indicates if the noise should uniform, gaussian, or zero. | |||
The default is uniform which means the the noise type will be decided by | |||
uniform_noise . \n | |||
* @par Outputs: | |||
* glimpse:A tensor representing the glimpses [batch_size, glimpse_height, | |||
glimpse_width, channels]. The format must be NHWC. \n | |||
* @par Third-party framework compatibility | |||
* Compatible with tensorflow ExtractGlimpseV2 operator. | |||
*/ | |||
REG_OP(ExtractGlimpseV2) | |||
.INPUT(input, TensorType({DT_FLOAT})) | |||
.INPUT(size, TensorType({DT_INT32})) | |||
.INPUT(offsets, TensorType({DT_FLOAT})) | |||
.OUTPUT(glimpse, TensorType({DT_FLOAT})) | |||
.ATTR(centered, Bool, true) | |||
.ATTR(normalized, Bool, true) | |||
.ATTR(uniform_noise, Bool, true) | |||
.ATTR(noise, String, "uniform") | |||
.OP_END_FACTORY_REG(ExtractGlimpseV2) | |||
} // namespace ge | |||
#endif // OPS_BUILT_IN_OP_PROTO_INC_IMAGE_OPS_H_ |
@@ -230,7 +230,7 @@ REG_OP(Bucketize) | |||
*input_x: A tensor. Must be one of the following types: float16, float32, int8, uint8, int32. \n | |||
*@par Outputs: | |||
*output_y: A tensor with the same type and shape of input_x \n | |||
* output_y: A tensor with the same type and shape of input_x \n | |||
*@par Third-party framework compatibility | |||
*Compatible with the Pytorch operator Trunc. \n | |||
@@ -1008,6 +1008,36 @@ REG_OP(Complex) | |||
.ATTR(Tout, Type, DT_COMPLEX64) | |||
.OP_END_FACTORY_REG(Complex) | |||
/** | |||
* @brief Counts the number of occurrences of each value in an integer array . \n | |||
* @par Inputs: | |||
* Five inputs, including: | |||
* indices: A 2D Tensor of type int64. | |||
* values: A 1D Tensor of type int32 or int64. | |||
* dense_shape: A 1D Tensor of type int64. | |||
* size: A non-negative scalar Tensor. | |||
* weights: A Tensor of type int32 or int64 or fp32 or fp64 or only 1 \n | |||
* @par Attributes: | |||
* dtype: An optional bool.Defaults to False. bool . \n | |||
* @par Outputs: | |||
* y: A Tensor . Has the same type as `input_weights` .\n | |||
* @par Third-party framework compatibility | |||
* Compatible with the TensorFlow operator SparseBincount. | |||
*/ | |||
REG_OP(SparseBincount) | |||
.INPUT(indices, TensorType({DT_INT64})) | |||
.INPUT(values, TensorType({DT_INT32, DT_INT64})) | |||
.INPUT(dense_shape, TensorType({DT_INT64})) | |||
.INPUT(size, TensorType({DT_INT32, DT_INT64})) | |||
.INPUT(weights, TensorType({DT_INT32, DT_INT64, DT_FLOAT, DT_DOUBLE})) | |||
.ATTR(binary_output, Bool, false) | |||
.OUTPUT(output, TensorType({DT_INT32, DT_INT64, DT_FLOAT, DT_DOUBLE})) | |||
.OP_END_FACTORY_REG(SparseBincount) | |||
/** | |||
* @brief deal complex. | |||
@@ -1098,7 +1128,7 @@ REG_OP(Cross) | |||
.OP_END_FACTORY_REG(Cross) | |||
/** | |||
*@brief Computes batched the p-norm distance between each pair of | |||
* @brief Computes batched the p-norm distance between each pair of | |||
*the two collections of row vectors. \n | |||
*@par Inputs: | |||
@@ -1445,6 +1475,72 @@ REG_OP(SparseCountSparseOutput) | |||
.ATTR(maxlength, Int, -1) | |||
.REQUIRED_ATTR(binary_output, Bool) | |||
.OP_END_FACTORY_REG(SparseCountSparseOutput) | |||
/** | |||
* @brief Counts the number of occurrences of each value in an integer array. \n | |||
* @par Inputs: | |||
* @li splits: A Tensor of type int64. 1D int64 Tensor. | |||
* @li values: A Tensor. Must be one of the following types: int32, int64. 2D int Tensor. | |||
* @li size: A Tensor. Must have the same type as values. non-negative int scalar Tensor. | |||
* @li weights: A Tensor. Must be one of the following types: float32. | |||
is a float32 Tensor with the same shape as input, | |||
or a length-0 Tensor, in which case it acts as all weights equal to 1. \n | |||
* @par Outputs: | |||
* @li output: A Tensor with length "size" for each stride and has the same dtype as weights. \n | |||
* @par Attributes: | |||
* binary_output: An optional bool. Defaults to False. bool; | |||
Whether the kernel should count the appearance or number of occurrences. \n | |||
* @attention Constraints: | |||
* The operator will use the interface set_atomic_add(), therefore weights and output should be float32 only. \n | |||
* @par Third-party framework compatibility | |||
* Compatible with tensorflow RaggedBinCount operator. | |||
*/ | |||
REG_OP(RaggedBinCount) | |||
.INPUT(splits, TensorType(DT_INT64)) | |||
.INPUT(values, TensorType({DT_INT32, DT_INT64})) | |||
.INPUT(size, TensorType({DT_INT32, DT_INT64})) | |||
.INPUT(weights, TensorType(DT_INT32, DT_INT64, DT_FLOAT, DT_DOUBLE)) | |||
.OUTPUT(output, TensorType(DT_INT32, DT_INT64, DT_FLOAT, DT_DOUBLE)) | |||
.ATTR(binary_output, Bool, false) | |||
.OP_END_FACTORY_REG(RaggedBinCount) | |||
/** | |||
* @brief Counts the number of occurrences of each value in an integer array. \n | |||
* @par Inputs: | |||
* @li input: A Tensor of type int32, int64. 1D or 2D int Tensor. | |||
* @li size: A Tensor. Must have the same type as input. non-negative int scalar Tensor. | |||
* @li weights: A Tensor. Must be one of the following types: int32, int64, float32, float64. | |||
with the same shape as input, | |||
or a length-0 Tensor, in which case it acts as all weights equal to 1. \n | |||
* @par Outputs: | |||
* @li output: A Tensor with length "size" for each stride and has the same dtype as weights. \n | |||
* @par Attributes: | |||
* binary_output: An optional bool. Defaults to False. bool; | |||
Whether the kernel should count the appearance or number of occurrences. \n | |||
* @attention Constraints: | |||
* The operator will use the interface set_atomic_add(), therefore weights and output should be float32 only. \n | |||
* @par Third-party framework compatibility | |||
* Compatible with tensorflow DenseBincount operator. | |||
*/ | |||
REG_OP(DenseBincount) | |||
.INPUT(input, TensorType({DT_INT32, DT_INT64})) | |||
.INPUT(size, TensorType({DT_INT32, DT_INT64})) | |||
.INPUT(weights, TensorType(DT_INT32, DT_INT64, DT_FLOAT, DT_DOUBLE)) | |||
.OUTPUT(output, TensorType(DT_INT32, DT_INT64, DT_FLOAT, DT_DOUBLE)) | |||
.ATTR(binary_output, Bool, false) | |||
.OP_END_FACTORY_REG(DenseBincount) | |||
} // namespace ge | |||
#endif // OPS_BUILT_IN_OP_PROTO_INC_MATH_OPS_H_ |
@@ -28,7 +28,7 @@ namespace ge { | |||
* @brief Computes the gradients of depthwise convolution with respect to | |||
* the filter. \n | |||
* @par Inputs: | |||
* Three inputs include: | |||
* Three inputs include: | |||
* @li input: 4D origin shape of input tensor [N, C, H, W] or [N, H, W, C], | |||
* support float16. | |||
* @li filter_size: A 4D tensor of type int32, int64, with shape [H, W, C, K] | |||
@@ -52,8 +52,7 @@ namespace ge { | |||
* @par Outputs: | |||
* filter_grad: Gradient of the deep convolution relative to the filter with | |||
* shape [H, W, C, K]. Must be one of the following types: float16, float32, | |||
* double . \n | |||
* shape [H, W, C, K]. Must be one of the following types: float16. \n | |||
* @attention Constraints:\n | |||
* The feature map is 4D with shape [N, C, Hi, Wi] or [N, Hi, Wi, C], but | |||
@@ -350,7 +349,7 @@ REG_OP(BiasAddGrad) | |||
/** | |||
*@brief Computes the gradients of convolution with respect to the input. | |||
*@par Inputs: | |||
* @par Inputs: | |||
* Three inputs: | |||
* @li input_size: A const Tensor of type int32. Currently does not support | |||
* data tensor. An integer vector representing the shape of input, where | |||
@@ -454,7 +453,7 @@ REG_OP(Conv2DBackpropInput) | |||
/** | |||
*@brief Computes the gradients of convolution with respect to the input. | |||
*@par Inputs: | |||
* @par Inputs: | |||
* Two inputs: | |||
* @li filter: A Tensor. Types is float16. | |||
* 4-D with shape [filter_height, filter_width, in_channels, out_channels] | |||
@@ -501,7 +500,7 @@ REG_OP(Conv2DBackpropInputD) | |||
/** | |||
*@brief Computes the Deconvolution with respect to the input. | |||
*@par Inputs: | |||
* @par Inputs: | |||
* Two required inputs: | |||
* @li x: A Tensor of type float16 or int8. 4D with shape | |||
* [batch, out_channels, out_height, out_width]. Gradients with respect | |||
@@ -1518,7 +1517,7 @@ REG_OP(Conv2DTranspose) | |||
/** | |||
*@brief Computes the transpose of convolution 2d with respect to the input. | |||
*@par Inputs: | |||
* @par Inputs: | |||
* Four inputs: | |||
* @li x: A Tensor of type float16, int8. | |||
* @li filter: A Tensor of type float16, int8. Must have the same type as "x". | |||
@@ -1566,7 +1565,7 @@ REG_OP(Conv2DTransposeD) | |||
/** | |||
*@brief Computes the deformed convolution output with the expected input | |||
*@par Inputs: | |||
* @par Inputs: | |||
* Two inputs: | |||
* @li x: A Tensor of type float16,float32 | |||
* @li offsets: A Tensor of type float16,float32.Deformation offset parameter. | |||
@@ -1599,7 +1598,7 @@ REG_OP(DeformableOffsets) | |||
/** | |||
*@brief Computes the gradients of DeformableOffsets with respect to input and offsets | |||
*@par Inputs: | |||
* @par Inputs: | |||
* Three inputs: | |||
* @li grad: A Tensor of type float16,float32. gradients with respect to DeformableOffsets output | |||
* @li x: A Tensor of type float16,float32. | |||
@@ -1636,7 +1635,7 @@ REG_OP(DeformableOffsetsGrad) | |||
/** | |||
*@brief Computes the deformed dilation output with the expected input | |||
*@par Inputs: | |||
* @par Inputs: | |||
* One inputs: | |||
* x: A Tensor of type int8, float16, float32 | |||
*@par Attributes: | |||
@@ -1656,7 +1655,7 @@ REG_OP(Dilation) | |||
/** | |||
*@brief Computes the post-cube processing output with the expected input | |||
*@par Inputs: | |||
* @par Inputs: | |||
* Ten inputs: | |||
* x1: A Tensor of type float16, bfloat16, float32, int32 | |||
* x2: A Tensor of type float16, int8, int4 | |||
@@ -75,37 +75,37 @@ REG_OP(Pooling) | |||
.OP_END_FACTORY_REG(Pooling) | |||
/** | |||
*@brief Performs average pooling on the input. \n | |||
*@par Inputs: | |||
*x: A tensor of type float16, float32, double. \n | |||
* @brief Performs average pooling on the input. \n | |||
* @par Inputs: | |||
* x: A tensor of type float16, float32, double. \n | |||
*@par Attributes: | |||
*@li ksize: A required list of 4 ints, specifying the size (N, C, H, and W) | |||
* @par Attributes: | |||
* @li ksize: A required list of 4 ints, specifying the size (N, C, H, and W) | |||
* of the sliding window, where N = C = 1, and H and W are positive integers | |||
* within the range [1, 255]. | |||
* @li strides: A required list of 4 ints, specifying the stride of the | |||
* sliding window. The strides of the N and C dimensions are 1. The strides of | |||
* the H and W dimensions are positive integers within the range [1, 63]. | |||
*@li padding: A required string, specifying the padding algorithm, | |||
* @li padding: A required string, specifying the padding algorithm, | |||
* either "VALID" or "SAME". With "SAME" means that the outputs will have the | |||
* same spatial dimensions as its inputs. With "VALID" means no padding. | |||
*@li data_format: An optional string, specifying the data format of "ksize" | |||
* @li data_format: An optional string, specifying the data format of "ksize" | |||
* and "strides", either "NCHW", or "NHWC" (default). \n | |||
*@par Outputs: | |||
* @par Outputs: | |||
* y: The average pooled output tensor. Has the same type and format | |||
* as input "x". \n | |||
* @attention Constraints: | |||
* @li This operator applies only to a TensorFlow network. | |||
* @li Only single input and single output are supported. | |||
*@li Global pooling is supported. | |||
* @li Global pooling is supported. | |||
* @li "ksize_H" and "ksize_W" are positive integers within the range [1, 255]. | |||
* ksize_H * ksize_W < 256 | |||
*@li Due to instruction restrictions, | |||
* @li Due to instruction restrictions, | |||
* the values of "strides_h" and "strides_w" are positive integers within | |||
* the range [1, 63]. | |||
*@par Third-party framework compatibility | |||
* @par Third-party framework compatibility | |||
* Compatible with the TensorFlow operator AvgPool. | |||
*/ | |||
REG_OP(AvgPool) | |||
@@ -118,37 +118,44 @@ REG_OP(AvgPool) | |||
.OP_END_FACTORY_REG(AvgPool) | |||
/** | |||
*@brief Performs average pooling on the input. | |||
*@par Inputs: | |||
*x: A tensor of type float16, float32, double. | |||
* @brief Performs average pooling on the input. | |||
* @par Inputs: | |||
* x: A tensor of type float16, float32, double. | |||
*@par Attributes: | |||
*@li ksize: A required list of 4 ints, specifying the size (N, C, H, and W) of the sliding window, | |||
* where N = C = 1, and H and W are positive integers within the range [1, 255]. | |||
*@li strides: A required list of 4 ints, specifying the stride of the sliding window. | |||
* The strides of the N and C dimensions are 1. | |||
* The strides of the H and W dimensions are positive integers within the range [1, 63]. | |||
*@li padding_mode: A required string, specifying the padding algorithm, | |||
* @par Attributes: | |||
* @li ksize: A required list of 4 ints, specifying the size (N, C, H, and W) | |||
* of the sliding window, where N = C = 1, | |||
* and H and W are positive integers within the range [1, 255]. | |||
* @li strides: A required list of 4 ints, specifying the stride of the | |||
* sliding window. The strides of the N and C dimensions are 1. | |||
* The strides of the H and W dimensions are positive integers within | |||
* the range [1, 63]. | |||
* @li padding_mode: A required string, specifying the padding algorithm, | |||
* either "VALID", "SAME" and "CALCULATED". | |||
* With "SAME" means that the outputs will have the same spatial dimensions as its inputs. | |||
* With "VALID" means no padding. | |||
* With "SAME" means that the outputs will have the same spatial dimensions | |||
* as its inputs. With "VALID" means no padding. | |||
* @li pads: Pad value when padding_mode is "CALCULATED". | |||
* @li data_format: An optional string, specifying the data format of "ksize" and "strides", | |||
* either "NCHW", or "NHWC" (default). | |||
* @li global_pooling: Global or not. If true, pads will change to {0,0,0,0} and ksize will change to [input_h, input_w] | |||
* @li ceil_mode: Use ceil or floor to calculate the output size when padding_mode is "CALCULATED". | |||
* @li data_format: An optional string, specifying the data format of "ksize" | |||
* and "strides", either "NCHW", or "NHWC" (default). | |||
* @li global_pooling: Global or not. If true, pads will change to {0,0,0,0} | |||
* and ksize will change to [input_h, input_w]. | |||
* @li ceil_mode: Use ceil or floor to calculate the output size when | |||
* padding_mode is "CALCULATED". | |||
* @li exclusive: Ignore padding area or not when calculating average. | |||
* @par Outputs: | |||
* y: The average pooled output tensor. Has the same type and format as input "x". | |||
* y: The average pooled output tensor. Has the same type and format as | |||
* input "x". | |||
*@attention Constraints: | |||
*@li Only single input and single output are supported. | |||
* @attention Constraints: | |||
* @li Only single input and single output are supported. | |||
* @li Global pooling is supported. | |||
*@li "ksize_H" and "ksize_W" are positive integers within the range [1, 255]. ksize_H * ksize_W < 256 | |||
*@li Due to instruction restrictions, | |||
* the values of "strides_h" and "strides_w" are positive integers within the range [1, 63]. | |||
*@par Third-party framework compatibility | |||
* @li "ksize_H" and "ksize_W" are positive integers within the range [1, 255]. | |||
* ksize_H * ksize_W < 256 | |||
* @li Due to instruction restrictions, | |||
* the values of "strides_h" and "strides_w" are positive integers within | |||
* the range [1, 63]. | |||
* @par Third-party framework compatibility | |||
* Compatible with the TensorFlow operator AvgPoolV2. | |||
*/ | |||
REG_OP(AvgPoolV2) | |||
@@ -173,7 +180,7 @@ REG_OP(AvgPoolV2) | |||
* @par Attributes: | |||
* @li ksize: List of ints that has length 1, 3 or 5. The size of the window | |||
* for each dimension of the input tensor. | |||
*@li strides:List of ints that has length 1, 3 or 5. The stride of the sliding | |||
* @li strides:List of ints that has length 1, 3 or 5. The stride of the sliding | |||
* window for each dimension of the input tensor. | |||
* @li pads: List of ints, implicit zero paddings on both sides of the input. | |||
* @li ceil_mode: When true, will use ceil instead of floor in the formula to | |||
@@ -184,13 +191,13 @@ REG_OP(AvgPoolV2) | |||
* size of the pooling region will be used. | |||
* @li data_format: A string, format of input data. \n | |||
*@par Outputs: | |||
*y: The average pooled output tensor. \n | |||
* @par Outputs: | |||
* y: The average pooled output tensor. \n | |||
*@attention Constraints: | |||
* @attention Constraints: | |||
* @li "ksize" is in the range [1, 255]. "strides" is in the range [1, 63]. | |||
*@par Third-party framework compatibility | |||
* @par Third-party framework compatibility | |||
* Compatible with the TensorFlow operator AvgPool3D. | |||
*/ | |||
REG_OP(AvgPool3D) | |||
@@ -211,24 +218,24 @@ REG_OP(AvgPool3D) | |||
* @par Inputs: | |||
* @li x: A 5-D Tensor of shape [batch, depth, height, width, channels] and type float16, float32, double. | |||
* @li filter: An optional tensor of type float16, float32, double, fractal_z_3d layout. | |||
*@li multiplier: An optional tensor of float16, float32, double. | |||
* @li multiplier: An optional tensor of float16, float32, double. | |||
* @par Attributes: | |||
*@li ksize: List of ints that has length 1, 3 or 5. The size of the window for each dimension of the input tensor. | |||
* @li ksize: List of ints that has length 1, 3 or 5. The size of the window for each dimension of the input tensor. | |||
* @li strides:List of ints that has length 1, 3 or 5. The stride of the sliding window for each dimension of the input tensor. | |||
*@li pads: List of ints, implicit zero paddings on both sides of the input. | |||
*@li ceil_mode: When true, will use ceil instead of floor in the formula to compute the output shape. | |||
* @li pads: List of ints, implicit zero paddings on both sides of the input. | |||
* @li ceil_mode: When true, will use ceil instead of floor in the formula to compute the output shape. | |||
* @li count_include_pad: When true, will include the zero-padding in the averaging calculation. | |||
*@li divisor_override: if specified, it will be used as divisor, otherwise size of the pooling region will be used. | |||
*@li data_format: A string, format of input data . \n | |||
* @li divisor_override: if specified, it will be used as divisor, otherwise size of the pooling region will be used. | |||
* @li data_format: A string, format of input data . \n | |||
*@par Outputs: | |||
*y: The average pooled output tensor . \n | |||
* @par Outputs: | |||
* y: The average pooled output tensor . \n | |||
*@attention Constraints: | |||
*"ksize" is in the range [1, 255]. "strides" is in the range [1, 63] | |||
* @attention Constraints: | |||
* "ksize" is in the range [1, 255]. "strides" is in the range [1, 63] | |||
*@par Third-party framework compatibility | |||
* @par Third-party framework compatibility | |||
* Compatible with the TensorFlow operator AvgPool3D. | |||
*/ | |||
REG_OP(AvgPool3DD) | |||
@@ -266,7 +273,7 @@ REG_OP(AvgPool3DD) | |||
* @li data_format: A string, format of input data. \n | |||
* @par Outputs: | |||
* @li output: A mutable tensor with the same shape and type as "grads". | |||
* output: A mutable tensor with the same shape and type as "orig_input_shape". | |||
* @attention Constraints: | |||
* @li "ksize" is in the range [1, 255]. "strides" is in the range [1, 63]. \n | |||
@@ -336,31 +343,31 @@ REG_OP(AvgPool3DGradD) | |||
.OP_END_FACTORY_REG(AvgPool3DGradD) | |||
/** | |||
*@brief Performs max_pool_ext2 on the input . \n | |||
* @brief Performs max_pool_ext2 on the input . \n | |||
*@par Inputs: | |||
* @par Inputs: | |||
* One input: | |||
*x: A Tensor of type float16. | |||
* x: A Tensor of type float16. | |||
*@par Attributes: | |||
*@li ksize: A required list of int8, int16, int32, or int64 values, | |||
* specifying the size of the window for each dimension of the input tensor. No default value. | |||
*@li strides: A required list of int8, int16, int32, or int64 values, | |||
* specifying the stride of the sliding window for each dimension of the input tensor. No default value. | |||
*@li padding: A required string. No default value. | |||
*@li data_format: An optional string . \n | |||
* @par Attributes: | |||
* @li ksize: A required list of int8, int16, int32, or int64 values, | |||
* specifying the size of the window for each dimension of the input tensor. No default value. | |||
* @li strides: A required list of int8, int16, int32, or int64 values, | |||
* specifying the stride of the sliding window for each dimension of the input tensor. No default value. | |||
* @li padding: A required string. No default value. | |||
* @li data_format: An optional string . \n | |||
*@par Outputs: | |||
*y: A Tensor. Has the same type and format as input "x" . \n | |||
* @par Outputs: | |||
* y: A Tensor. Has the same type and format as input "x" . \n | |||
*@attention Constraints: | |||
*@li "ksize" is a list that has length 4: ksize[0] = 1 or ksize[3] = 1, ksize[1] * ksize[2] <= 255. | |||
*@li "stride is a list that has length 4: strides[0] = 1 or strides[3] = 1, | |||
* @attention Constraints: | |||
* @li "ksize" is a list that has length 4: ksize[0] = 1 or ksize[3] = 1, ksize[1] * ksize[2] <= 255. | |||
* @li "stride is a list that has length 4: strides[0] = 1 or strides[3] = 1, | |||
* strides[1] <= 63, strides[0] >= 1, strides[2] <= 63, strides[2] >= 1. | |||
*@li "padding" is either "SAME" or "VALID" . \n | |||
* @li "padding" is either "SAME" or "VALID" . \n | |||
*@par Third-party framework compatibility | |||
* @par Third-party framework compatibility | |||
* Compatible with the TensorFlow operator MaxPoolV2. | |||
*/ | |||
REG_OP(MaxPoolExt2) | |||
@@ -377,35 +384,35 @@ REG_OP(MaxPoolExt2) | |||
.OP_END_FACTORY_REG(MaxPoolExt2) | |||
/** | |||
*@brief Performs max pooling on the input . \n | |||
* @brief Performs max pooling on the input . \n | |||
* @par Inputs: | |||
* One input: | |||
* x: A Tensor. Supported type:float16, float32, double, int8, int16, | |||
* int32, int64, uint8, uint16, qint8 | |||
*@par Attributes: | |||
*@li ksize: A required list of int8, int16, int32, or int64 values, | |||
* @par Attributes: | |||
* @li ksize: A required list of int8, int16, int32, or int64 values, | |||
* specifying the size of the window for each dimension of the input tensor. | |||
* No default value. | |||
*@li strides: A required list of int8, int16, int32, or int64 values, | |||
* @li strides: A required list of int8, int16, int32, or int64 values, | |||
* specifying the stride of the sliding window for each dimension of | |||
* the input tensor. No default value. | |||
*@li padding: A required string. No default value. | |||
*@li data_format: An optional string. Defaults to "NHWC" . \n | |||
* @li padding: A required string. No default value. | |||
* @li data_format: An optional string. Defaults to "NHWC" . \n | |||
*@par Outputs: | |||
*y: A Tensor. Has the same type and format as input "x" . \n | |||
* @par Outputs: | |||
* y: A Tensor. Has the same type and format as input "x" . \n | |||
*@attention Constraints: | |||
*@li "ksize" is a list that has length 4: ksize[0] = 1 or ksize[3] = 1, | |||
* @attention Constraints: | |||
* @li "ksize" is a list that has length 4: ksize[0] = 1 or ksize[3] = 1, | |||
* ksize[1] * ksize[2] <= 255. | |||
*@li "stride is a list that has length 4: strides[0] = 1 or strides[3] = 1, | |||
* @li "stride is a list that has length 4: strides[0] = 1 or strides[3] = 1, | |||
* strides[1] <= 63, strides[0] >= 1, strides[2] <= 63, strides[2] >= 1. | |||
*@li "padding" is either "SAME" or "VALID". | |||
* @li "padding" is either "SAME" or "VALID". | |||
*@par Third-party framework compatibility | |||
* @par Third-party framework compatibility | |||
* Compatible with the TensorFlow operator MaxPool. | |||
*/ | |||
REG_OP(MaxPool) | |||
@@ -423,33 +430,33 @@ REG_OP(MaxPool) | |||
/** | |||
* @brief Performs max 3d pooling on the input . \n | |||
*@par Inputs: | |||
* @par Inputs: | |||
* x: A Tensor. Supported type float16, float32, double . \n | |||
*@par Attributes: | |||
*@li ksize: A required list of int8, int16, int32, or int64 values, | |||
* @par Attributes: | |||
* @li ksize: A required list of int8, int16, int32, or int64 values, | |||
specifying the size of the window for each dimension of the input tensor. | |||
No default value. | |||
*@li strides: A required list of int8, int16, int32, or int64 values, | |||
* @li strides: A required list of int8, int16, int32, or int64 values, | |||
specifying the stride of the sliding window for each dimension of | |||
the input tensor. No default value. | |||
*@li padding: A required string type of float16. | |||
*@li pads: A list type of int32. Default value {0,0,0,0,0,0}. | |||
*@li dilation: A list type of int32. Default value {1,1,1,1,1,1}. | |||
*@li ceil_mode: A ceil mode number of int32 . Default value 0. | |||
*@li data_format: An optional string. Defaults to "NDHWC" . \n | |||
* @li padding: A required string type of float16. | |||
* @li pads: A list type of int32. Default value {0,0,0,0,0,0}. | |||
* @li dilation: A list type of int32. Default value {1,1,1,1,1,1}. | |||
* @li ceil_mode: A ceil mode number of int32 . Default value 0. | |||
* @li data_format: An optional string. Defaults to "NDHWC" . \n | |||
*@par Outputs: | |||
*y: A Tensor. Has the same type and format as input "x" . \n | |||
* @par Outputs: | |||
* y: A Tensor. Has the same type and format as input "x" . \n | |||
*@attention Constraints: | |||
*@li "ksize" is a list that has length 4: ksize[0] = 1 or ksize[3] = 1, | |||
* @attention Constraints: | |||
* @li "ksize" is a list that has length 4: ksize[0] = 1 or ksize[3] = 1, | |||
* ksize[1] * ksize[2] <= 255. | |||
*@li "stride is a list that has length 4: strides[0] = 1 or strides[3] = 1, | |||
* @li "stride is a list that has length 4: strides[0] = 1 or strides[3] = 1, | |||
* strides[1] <= 63, strides[0] >= 1, strides[2] <= 63, strides[2] >= 1. | |||
*@li "padding" is either "SAME" or "VALID" . \n | |||
* @li "padding" is either "SAME" or "VALID" . \n | |||
*@par Third-party framework compatibility | |||
* @par Third-party framework compatibility | |||
* Compatible with the TensorFlow operator MaxPool3D. | |||
*/ | |||
REG_OP(MaxPool3D) | |||
@@ -466,7 +473,7 @@ REG_OP(MaxPool3D) | |||
/** | |||
* @brief Performs max pooling3d on both max values and indices. | |||
* | |||
* | |||
* @par Inputs: | |||
* One input: | |||
* x: An 6D tensor. Supported type: float16. Format as NDC1HWC0. | |||
@@ -484,7 +491,7 @@ REG_OP(MaxPool3D) | |||
* @li data_format: the format of torch input, default value is "NCDHW". | |||
* @li argmax_type: the function of this field is to determine the type of | |||
* output argmax, "bitmask" is the default value, the argmax will return | |||
* a img2col bitmask. "index_int32" and "index_int64" represent the torch | |||
* a img2col bitmask. "index_int32" and "index_int64" represent the torch | |||
* output indices. | |||
* @par Outputs: | |||
* y: An 6D tensor. the maxpool3d output(max value), format as NDoC1HoWoC0. | |||
@@ -505,8 +512,8 @@ REG_OP(MaxPool3DWithArgmax) | |||
.OP_END_FACTORY_REG(MaxPool3DWithArgmax) | |||
/** | |||
*@brief Applies a 2D adaptive max pooling over an input signal conposed of several input planes. \n | |||
* The output is of size H x W, for any input size. | |||
* @brief Applies a 2D adaptive max pooling over an input signal conposed of several input planes. \n | |||
* The output is of size H x W, for any input size. | |||
* @par Inputs: | |||
* One input, including: | |||
@@ -698,31 +705,31 @@ REG_OP(MaxPoolV2) | |||
* @brief Performs max pooling on the input and outputs both max values and | |||
* indices . \n | |||
*@par Inputs: | |||
* @par Inputs: | |||
* One input: | |||
* x: An 4D Tensor. Supported type: float, double, int32, | |||
* uint8, int16, int8, int64, uint16, half, uint32, uint64. | |||
* Must set the format, supported format list ["NCHW, NHWC"]. \n | |||
*@par Attributes: | |||
*@li ksize: A required list of int8, int16, int32, or int64 values, | |||
* @par Attributes: | |||
* @li ksize: A required list of int8, int16, int32, or int64 values, | |||
* specifying the size of the window for each dimension of the input tensor. | |||
* No default value. | |||
*@li strides: A required list of int8, int16, int32, or int64 values, | |||
* @li strides: A required list of int8, int16, int32, or int64 values, | |||
* specifying the stride of the sliding window for each dimension of | |||
* the input tensor. No default value. | |||
*@li padding: A required string. No default value . | |||
*@li Targmax:An optional int with default value 7 . \n | |||
* @li padding: A required string. No default value . | |||
* @li Targmax:An optional int with default value 7 . \n | |||
*@par Outputs: | |||
*@li y: A Tensor. Has the same type and format as input "x". | |||
*@li argmax: A Tensor. Has the same type and format as input "x". | |||
* @par Outputs: | |||
* @li y: A Tensor. Has the same type and format as input "x". | |||
* @li argmax: A Tensor. Has the same type and format as input "x". | |||
* @attention Constraints: | |||
*@li "ksize" is a list that has length 4: ksize[0] = 1 or ksize[3] = 1, | |||
* @li "ksize" is a list that has length 4: ksize[0] = 1 or ksize[3] = 1, | |||
* ksize[1] * ksize[2] <= 255. | |||
*@li "stride is a list that has length 4: strides[0] = 1 or strides[3] = 1, | |||
* @li "stride is a list that has length 4: strides[0] = 1 or strides[3] = 1, | |||
* strides[1] <= 63, strides[0] >= 1, strides[2] <= 63, strides[2] >= 1. | |||
*@li "padding" is either "SAME" or "VALID" . | |||
* @li "padding" is either "SAME" or "VALID" . | |||
*@par Third-party framework compatibility | |||
* Compatible with the TensorFlow operator MaxPoolWithArgmax. | |||
@@ -760,7 +767,7 @@ REG_OP(MaxPoolWithArgmax) | |||
* @li padding: A required string. No default value . \n | |||
* @par Outputs: | |||
*y: A Tensor. Has the same type and format as input "x" . \n | |||
* y: A Tensor. Has the same type and format as input "x" . \n | |||
* @attention Constraints: | |||
* @li "ksize" is a list that has length 4: ksize[0] = 1 or ksize[3] = 1, | |||
@@ -873,7 +880,7 @@ REG_OP(MaxPoolGradGradWithArgmax) | |||
* @li data_format: An optional string. Defaults to "NHWC". \n | |||
* @par Outputs: | |||
* out_grad: A mutable tensor with the same shape and type as "input_grad". \n | |||
* out_grad: A mutable tensor with the same shape and type as "orig_input_shape". \n | |||
* @par Third-party framework compatibility | |||
* @li Compatible with the TensorFlow operator AvgPoolGrad. | |||
@@ -965,7 +972,7 @@ REG_OP(AvgPoolV2Grad) | |||
/** | |||
* @brief Computes gradients of averagev2 pooling function. | |||
* @par Inputs: | |||
*input_grad: An NHWC tensor of type float16, float32, or double. | |||
* input_grad: An NHWC tensor of type float16, float32, or double. | |||
* @par Attributes: | |||
* @li orig_input_shape: A required tuple or list of type int32. | |||
@@ -983,10 +990,10 @@ REG_OP(AvgPoolV2Grad) | |||
* @li data_format: An optional string. Defaults to "NHWC". | |||
* @par Outputs: | |||
*out_grad: A mutable tensor with the same shape and type as "orig_input". | |||
* out_grad: A mutable tensor with the same shape and type as "orig_input". | |||
* @par Third-party framework compatibility | |||
*Compatible with the TensorFlow operator AvgPoolGrad. | |||
* Compatible with the TensorFlow operator AvgPoolGrad. | |||
*/ | |||
REG_OP(AvgPoolV2GradD) | |||
.INPUT(input_grad, TensorType({DT_FLOAT16})) | |||
@@ -1005,16 +1012,16 @@ REG_OP(AvgPoolV2GradD) | |||
.OP_END_FACTORY_REG(AvgPoolV2GradD) | |||
/** | |||
*@brief upsample the layer, similar to the nearest-neighbor difference scaling algorithm. | |||
* @brief upsample the layer, similar to the nearest-neighbor difference scaling algorithm. | |||
*@par Inputs: | |||
* @par Inputs: | |||
* one input, including: | |||
* x: A tensor of type float16 or float32. | |||
*@par Attributes: | |||
*@li scale: A optional float32, scale factor of x. Defaults to "1.0". | |||
*@li stride_h: An optional int32, broadcast the axis of h. Defaults to "2". | |||
*@li stride_w: An optional int32, broadcast the axis of w. Defaults to "2". | |||
*@par Outputs: | |||
* @par Attributes: | |||
* @li scale: A optional float32, scale factor of x. Defaults to "1.0". | |||
* @li stride_h: An optional int32, broadcast the axis of h. Defaults to "2". | |||
* @li stride_w: An optional int32, broadcast the axis of w. Defaults to "2". | |||
* @par Outputs: | |||
*y: A tensor of type float16 or float32. | |||
*/ | |||
REG_OP(Upsample) | |||
@@ -1026,10 +1033,10 @@ REG_OP(Upsample) | |||
.OP_END_FACTORY_REG(Upsample) | |||
/** | |||
*@brief Computes gradient of the FractionalMaxPool function . \n | |||
* @brief Computes gradient of the FractionalMaxPool function . \n | |||
*@par Inputs: | |||
*Inputs include: | |||
* @par Inputs: | |||
* Inputs include: | |||
* @li orig_input: A Tensor. Must be one of the following types: float32, float64, int32, int64. | |||
* @li orig_output: A Tensor. Must have the same type as orig_input. | |||
* @li out_backprop: A Tensor. Must have the same type as orig_input. | |||
@@ -1037,17 +1044,17 @@ REG_OP(Upsample) | |||
* @li row_pooling_sequence: A Tensor of type int64. | |||
* @li col_pooling_sequence: A Tensor of type int64 . \n | |||
*@par Attributes: | |||
*overlapping: An optional bool. Defaults to False . \n | |||
* @par Attributes: | |||
* overlapping: An optional bool. Defaults to False . \n | |||
*@par Outputs: | |||
*y: A Tensor. Has the same type as orig_input . \n | |||
* @par Outputs: | |||
* y: A Tensor. Has the same type as orig_input . \n | |||
*@attention Constraints: | |||
*The implementation for FractionalMaxPoolGrad on Ascend uses AICPU, with bad performance. | |||
* @attention Constraints: | |||
* The implementation for FractionalMaxPoolGrad on Ascend uses AICPU, with bad performance. | |||
*@par Third-party framework compatibility | |||
*@li compatible with tensorflow FractionalMaxPoolGrad operator. | |||
* @par Third-party framework compatibility | |||
* @li compatible with tensorflow FractionalMaxPoolGrad operator. | |||
*/ | |||
REG_OP(FractionalMaxPoolGrad) | |||
.INPUT(orig_input, TensorType({DT_FLOAT, DT_DOUBLE, DT_INT32, DT_INT64})) | |||
@@ -1330,7 +1337,7 @@ REG_OP(AvgPool1DD) | |||
* @par Inputs: | |||
* One input: | |||
* x: An 5hd Tensor of type float16. | |||
* x: An 5hd Tensor of type float16. | |||
* Must set the format, supported format list ["NC1HWC0"]. | |||
* @par Attributes: | |||
* @li ksize: A required list of int8, int16, int32, or int64 values, | |||
@@ -1376,19 +1383,19 @@ REG_OP(MaxPoolWithArgmaxV2) | |||
* @par Inputs: | |||
* Three inputs, including: | |||
* @li x: An 5hd tensor of type float16. | |||
* @li x: An 5hd tensor of type float16. | |||
* Must set the format, supported format list ["NC1HWC0"] | |||
* @li grad: An 5hd tensor of type float16. | |||
* @li grad: An 5hd tensor of type float16. | |||
* Must set the format, supported format list ["NC1HWC0"] | |||
* @li argmax: An 5hd tensor of type uint16 or int64. | |||
* @li argmax: An 5hd tensor of type uint16 or int64. | |||
* Must set the format, supported format list ["NC1HWC0"] \n | |||
* @par Attributes: | |||
* @li ksize: A required list of int8, int16, int32, or int64 values, | |||
* @li ksize: A required list of int8, int16, int32, or int64 values, | |||
* specifying the size of the window for each dimension of the input tensor. No default value. | |||
* @li strides: A required list of int8, int16, int32, or int64 values, | |||
* @li strides: A required list of int8, int16, int32, or int64 values, | |||
* specifying the stride of the sliding window for each dimension of the input tensor. No default value. | |||
* @li pads: A required list of int8, int16, int32, or int64 values, | |||
* @li pads: A required list of int8, int16, int32, or int64 values, | |||
* specifying the pad of the input feature map. No default value. \n | |||
* @li dtype: A optional int. default value is 3. | |||
* @li dilation: A optional list of int8, int16, int32, or int64 values. | |||
@@ -1398,11 +1405,11 @@ REG_OP(MaxPoolWithArgmaxV2) | |||
* y: A Tensor. Has the same type and format as input "x". \n | |||
* @attention Constraints: | |||
* @li ksize: a list that has length 4: | |||
* @li ksize: a list that has length 4: | |||
* ksize[0] = 1, ksize[1] = 1, ksize[2] * ksize[3] <= (ub_size-8)*1024//7//2//16. | |||
* @li strides: a list that has length 4: | |||
* @li strides: a list that has length 4: | |||
* strides[0] = 1, strides[1] = 1, 1 <= strides[2] <= 2048, 1 <= strides[3] <= 2048. | |||
* @li pads: a list that has length 4: | |||
* @li pads: a list that has length 4: | |||
* pads[0] = 1, pads[1] = 1, 1 <= pads[2] <= (ksize[2]//2), 1 <= pads[3] <= (ksize[3]//2). | |||
* @li dilation: a list that has length 4. | |||
* @li ceil_mode: is a bool, default is false. \n | |||
@@ -1532,7 +1539,7 @@ REG_OP(MaxPoolV3Grad) | |||
*@brief Performs Dilation2D on the input . \n | |||
*@par Inputs: | |||
*@li x: A tensor of shape is 4d, format is support NHWC. | |||
* @li x: A tensor of shape is 4d, format is support NHWC. | |||
*@li filter: A tensor of shape is 3d, the type is same with x, and the c dimension is same with x. \n | |||
*@par Attributes: | |||
@@ -1566,12 +1573,12 @@ REG_OP(Dilation2D) | |||
*@par Inputs: | |||
*@li x: A tensor of shape is 4d, format is support NHWC. | |||
*@li filter: A tensor of shape is 3d, the type is same with x, and the c dimension is same with x. | |||
* @li filter: A tensor of shape is 3d, the type is same with x, and the c dimension is same with x. | |||
*@li out_backprop: Has the same type and format as input x and the c dimension is same with x. \n | |||
*@par Attributes | |||
*@li strides: A required list of 4 ints, specifying the stride of the sliding window. The strides of the N and C dimension are 1. | |||
*@li rates: A required list of 4 ints, the rates of the N and C dimensions are 1. | |||
* @li rates: A required list of 4 ints, the rates of the N and C dimensions are 1. | |||
*@li padding_mode: A optional string. Defaults to "SAME", it support SAME and VALID. | |||
*@li pads: A optional list of 4 ints. | |||
*@li ceil_mode: An optional bool. Defaults to "false". Use ceil or floor to calculate the output size when padding_mode is "CALCULATED". | |||
@@ -1605,7 +1612,7 @@ REG_OP(Dilation2DBackpropFilter) | |||
*@par Inputs: | |||
*@li x: A tensor of shape is 4d, format is support NHWC. | |||
*@li filter: A tensor of shape is 3d, the type is same with x, and the c dimension is same with x. | |||
* @li filter: A tensor of shape is 3d, the type is same with x, and the c dimension is same with x. | |||
*@li out_backprop: Has the same type and format as input x and the c dimension is same with x. \n | |||
*@par Attributes | |||
@@ -1640,7 +1647,7 @@ REG_OP(Dilation2DBackpropInput) | |||
.OP_END_FACTORY_REG(Dilation2DBackpropInput) | |||
/** | |||
* @brief Applies a 2D adaptive average pooling over | |||
* @brief Applies a 2D adaptive average pooling over | |||
* an input signal composed of several input planes. \n | |||
* @par Inputs: | |||
@@ -1696,11 +1703,11 @@ REG_OP(AdaptiveAvgPool2dGrad) | |||
* @li argmax: A tensor of type uint16 or int64. \n | |||
* @par Attributes: | |||
* @li ksize: A required list of int8, int16, int32, or int64 values, | |||
* @li ksize: A required list of int8, int16, int32, or int64 values, | |||
* specifying the size of the window for each dimension of the input tensor. No default value. | |||
* @li strides: A required list of int8, int16, int32, or int64 values, | |||
* @li strides: A required list of int8, int16, int32, or int64 values, | |||
* specifying the stride of the sliding window for each dimension of the input tensor. No default value. | |||
* @li pads: A required list of int8, int16, int32, or int64 values, | |||
* @li pads: A required list of int8, int16, int32, or int64 values, | |||
* specifying the pad of the input feature map. No default value. \n | |||
* @par Outputs: | |||
@@ -1708,11 +1715,11 @@ REG_OP(AdaptiveAvgPool2dGrad) | |||
* @attention Constraints: | |||
* @li The MaxPoolGradWithArgmaxV2 operator has the same function, and it is recommended to use the V2 operator. | |||
* @li ksize: a list that has length 4: | |||
* @li ksize: a list that has length 4: | |||
* ksize[0] = 1, ksize[3] = 1, ksize[1] * ksize[2] <= (ub_size-8)*1024//7//2//16. | |||
* @li strides: a list that has length 4: | |||
* @li strides: a list that has length 4: | |||
* strides[0] = 1, strides[3] = 1, 1 <= strides[1] <= 2048, 1 <= strides[2] <= 2048. | |||
* @li pads: a list that has length 4: | |||
* @li pads: a list that has length 4: | |||
* pads[0] = 1, pads[3] = 1, 1 <= pads[2] <= (ksize[1]//2), 1 <= pads[2] <= (ksize[3]//2). | |||
* @li ceil_mode: defaults to False.\n | |||
@@ -1778,7 +1785,7 @@ REG_OP(MaxPoolWithArgmaxV1) | |||
.OP_END_FACTORY_REG(MaxPoolWithArgmaxV1) | |||
/** | |||
*@brief Randomly sample a subset of positive and negative examples,and overwrite | |||
* @brief Randomly sample a subset of positive and negative examples,and overwrite | |||
the label vector to the ignore value (-1) for all elements that are not | |||
included in the sample.\n | |||
@@ -1790,14 +1797,14 @@ included in the sample.\n | |||
* @li batch_size_per_images: A require attribute of type int. | |||
* @li positive_fraction: A require attribute of type float. | |||
*@par Outputs: | |||
*y: The result of subSample. \n | |||
* @par Outputs: | |||
* y: The result of subSample. \n | |||
*@par Third-party framework compatibility | |||
*Compatible with the Pytorch operator SubSample. | |||
* @par Third-party framework compatibility | |||
* Compatible with the Pytorch operator SubSample. | |||
*@attention Constraints: | |||
*Warning: This operator can be integrated only by MaskRcnn. Please do not use it directly. | |||
* @attention Constraints: | |||
* Warning: This operator can be integrated only by MaskRcnn. Please do not use it directly. | |||
*/ | |||
REG_OP(SubSample) | |||
.INPUT(labels, TensorType({DT_INT32})) | |||
@@ -1807,7 +1814,7 @@ REG_OP(SubSample) | |||
.OP_END_FACTORY_REG(SubSample) | |||
/** | |||
*@brief Randomly sample a subset of positive and negative examples,and overwrite | |||
* @brief Randomly sample a subset of positive and negative examples,and overwrite | |||
the label vector to the ignore value (-1) for all elements that are not | |||
included in the sample.\n | |||
@@ -1820,14 +1827,14 @@ included in the sample.\n | |||
* @li batch_size_per_images: A require attribute of type int. | |||
* @li positive_fraction: A require attribute of type float. | |||
*@par Outputs: | |||
*y: The result of subSample. \n | |||
* @par Outputs: | |||
* y: The result of subSample. \n | |||
*@par Third-party framework compatibility | |||
*Compatible with the Pytorch operator SubSampleLabels. | |||
* @par Third-party framework compatibility | |||
* Compatible with the Pytorch operator SubSampleLabels. | |||
*@attention Constraints: | |||
*Warning: This operator can be integrated only by MaskRcnn. Please do not use it directly. | |||
* @attention Constraints: | |||
* Warning: This operator can be integrated only by MaskRcnn. Please do not use it directly. | |||
*/ | |||
REG_OP(SubSampleLabels) | |||
.INPUT(labels, TensorType({DT_INT32})) | |||
@@ -1838,22 +1845,22 @@ REG_OP(SubSampleLabels) | |||
.OP_END_FACTORY_REG(SubSampleLabels) | |||
/** | |||
*@brief Computes GlobalLpPool, GlobalLpPool consumes an input tensor X and applies lp pool pooling across the | |||
* @brief Computes GlobalLpPool, GlobalLpPool consumes an input tensor X and applies lp pool pooling across the | |||
values in the same channel. \n | |||
*@par Inputs: | |||
* @par Inputs: | |||
* x: A Tensor of type float16 or float32 . \n | |||
*@par Attributes: | |||
*@li p: Optional. Must be one of the following types: float32. Defaults to 2.0. \n | |||
* @par Attributes: | |||
* @li p: Optional. Must be one of the following types: float32. Defaults to 2.0. \n | |||
*@par Outputs: | |||
* @par Outputs: | |||
* y: A Tensor. Has the same type as "x", when shape of x is [N,C,H,W], shape of y is [N,C,1,1]. | |||
*@par Third-party framework compatibility | |||
* @par Third-party framework compatibility | |||
* Compatible with the onnx operator GlobalLpPool. | |||
*@par Restrictions: | |||
*Warning: THIS FUNCTION IS DEPRECATED. | |||
*Warning: THIS FUNCTION IS EXPERIMENTAL. Please do not use. | |||
* @par Restrictions: | |||
* Warning: THIS FUNCTION IS DEPRECATED. | |||
* Warning: THIS FUNCTION IS EXPERIMENTAL. Please do not use. | |||
*/ | |||
REG_OP(GlobalLpPool) | |||
@@ -25,17 +25,17 @@ | |||
namespace ge { | |||
/** | |||
*@brief The GELU activation function is x*Φ(x), | |||
* @brief The GELU activation function is x*Φ(x), | |||
* where Φ(x) the standard Gaussian cumulative distribution function. | |||
*@par Inputs: | |||
*One input, including: \n | |||
*x: A Tensor. Must be one of the following types: float16, float32. \n | |||
* @par Inputs: | |||
* One input, including: \n | |||
* x: A Tensor. Must be one of the following types: float16, float32. \n | |||
*@par Outputs: | |||
*y: A Tensor. Has the same type as "x". \n | |||
* @par Outputs: | |||
* y: A Tensor. Has the same type as "x". \n | |||
*@par Third-party framework compatibility: | |||
* @par Third-party framework compatibility: | |||
* Compatible with the TensorFlow operator Gelu. | |||
*/ | |||
REG_OP(Gelu) | |||
@@ -125,17 +125,17 @@ REG_OP(SwishGrad) | |||
.OP_END_FACTORY_REG(SwishGrad) | |||
/** | |||
*@brief Computes the gradient for the gelu of "x" . | |||
* @brief Computes the gradient for the gelu of "x" . | |||
*@par Inputs: | |||
* @par Inputs: | |||
* Three inputs, including: | |||
*@li dy: A Tensor. Must be one of the following types: float16, float32. | |||
*@li x: A Tensor of the same type as "dy". | |||
*@li y: A Tensor of the same type as "dy" . \n | |||
* @li dy: A Tensor. Must be one of the following types: float16, float32. | |||
* @li x: A Tensor of the same type as "dy". | |||
* @li y: A Tensor of the same type as "dy" . \n | |||
*@par Outputs: | |||
*z: A Tensor. Has the same type as "dy". | |||
*@par Third-party framework compatibility | |||
* @par Outputs: | |||
* z: A Tensor. Has the same type as "dy". | |||
* @par Third-party framework compatibility | |||
* Compatible with the TensorFlow operator GeluGrad. | |||
*/ | |||
REG_OP(GeluGrad) | |||
@@ -799,20 +799,20 @@ REG_OP(LeakyReluGrad) | |||
.OP_END_FACTORY_REG(LeakyReluGrad) | |||
/** | |||
*@brief Thresholds grad each element of the input Tensor . | |||
* @brief Thresholds grad each element of the input Tensor . | |||
*@par Inputs: | |||
* @par Inputs: | |||
* @li gradients: A Tensor shape and dtype of input gradients. Support float16, int32. | |||
* @li features: A Tensor shape and dtype of input features. Support float16, int32 . \n | |||
*@par Attributes: | |||
*threshold: A float32 scale value to threshold at . \n | |||
* @par Attributes: | |||
* threshold: A float32 scale value to threshold at . \n | |||
*@par Outputs: | |||
*backprops: A Tensor of shape and dtype of output backprops, should be same shape and type as inputs . \n | |||
* @par Outputs: | |||
* backprops: A Tensor of shape and dtype of output backprops, should be same shape and type as inputs . \n | |||
*@par Restrictions: | |||
*Warning: THIS FUNCTION IS EXPERIMENTAL. Please do not use. | |||
* @par Restrictions: | |||
* Warning: THIS FUNCTION IS EXPERIMENTAL. Please do not use. | |||
*/ | |||
REG_OP(ThresholdGradV2D) | |||
.INPUT(gradients, TensorType({DT_INT32, DT_FLOAT16})) | |||
@@ -822,20 +822,20 @@ REG_OP(ThresholdGradV2D) | |||
.OP_END_FACTORY_REG(ThresholdGradV2D) | |||
/** | |||
*@brief Thresholds each element of the input Tensor y = (x > threshold) ? x : value . | |||
* @brief Thresholds each element of the input Tensor y = (x > threshold) ? x : value . | |||
*@par Inputs: | |||
*x: A Tensor dtype of real number . \n | |||
* @par Inputs: | |||
* x: A Tensor dtype of real number . \n | |||
*@par Attributes: | |||
*@li threshold: A float32 scale value to threshold at. | |||
*@li value: A float32 scale value to replace with . \n | |||
* @par Attributes: | |||
* @li threshold: A float32 scale value to threshold at. | |||
* @li value: A float32 scale value to replace with . \n | |||
*@par Outputs: | |||
*y: A Tensor of shape and dtype of output, should be same shape and type as input . \n | |||
* @par Outputs: | |||
* y: A Tensor of shape and dtype of output, should be same shape and type as input . \n | |||
*@par Restrictions: | |||
*Warning: THIS FUNCTION IS EXPERIMENTAL. Please do not use. | |||
* @par Restrictions: | |||
* Warning: THIS FUNCTION IS EXPERIMENTAL. Please do not use. | |||
*/ | |||
REG_OP(ThresholdV2D) | |||
.INPUT(x, TensorType::RealNumberType()) | |||
@@ -528,33 +528,57 @@ REG_OP(DropOutGenMaskV3) | |||
/** | |||
*@brief Generate stateless random bit mask for dropout . \n | |||
* @brief Generate stateless random bit mask for dropout . \n | |||
*@par Inputs: | |||
* @par Inputs: | |||
include: | |||
*@li shape:The shape of the output tensor. | |||
*@li prob:0-D. Number of bit 1 . \n | |||
*@li seed:If either seed or seed2 are set to be non-zero, the random number | |||
*generator is seeded by the given seed. Otherwise, it is seeded by a random seed. | |||
*@li seed2:A second seed to avoid seed collision . \n | |||
* @li shape:The shape of the output tensor. | |||
* @li prob:0-D. Number of bit 1 . \n | |||
* @li seed:Frist seed to avoid seed collision. | |||
* @li seed1:Second seed to avoid seed collision . \n | |||
* @li offset:Initial offset of random number . \n | |||
*@par Outputs: | |||
* @par Outputs: | |||
*y:Output (1-D) random number using uint data format . \n | |||
*@attention Constraints: | |||
* @attention Constraints: | |||
*The output is aligned with 128 bits | |||
*@see StatelessDropOutGenMask() | |||
* @see StatelessDropOutGenMask() | |||
*/ | |||
REG_OP(StatelessDropOutGenMask) | |||
.INPUT(shape, TensorType({ DT_INT32, DT_INT64 })) | |||
.INPUT(prob, TensorType({ DT_FLOAT16, DT_FLOAT })) | |||
.INPUT(seed, TensorType({ DT_INT32, DT_INT64 })) | |||
.INPUT(seed1, TensorType({ DT_INT32, DT_INT64 })) | |||
.OPTIONAL_INPUT(offset, TensorType({ DT_INT64 })) | |||
.OUTPUT(y, TensorType({ DT_UINT8 })) | |||
.OP_END_FACTORY_REG(StatelessDropOutGenMask) | |||
/** | |||
* @brief Generate bernoulli distribution for tensor input . \n | |||
* @par Inputs: | |||
include: | |||
* @li shape:The shape of the output tensor. A Tensor of type int32, int64. | |||
* @li prob:0-D. Number of bit 1 . \n | |||
* @li seed:If seed is set to be -1, and offset is set to be 0, the random number | |||
* generator is seeded by arandom seed. Otherwise, it is seeded by the given seed. | |||
* @li offset:To avoid seed collision . \n | |||
* @par Outputs: | |||
* y:A Tensor. A Tensor of type int8, uint8, int16, uint16, | |||
* int32, uint32, int64, uint64, bool, float16, float, double, bf16. \n | |||
*/ | |||
REG_OP(StatelessBernoulli) | |||
.INPUT(shape, TensorType({ DT_INT32, DT_INT64})) | |||
.INPUT(prob, TensorType({ DT_FLOAT16, DT_FLOAT, DT_DOUBLE })) | |||
.INPUT(seed, TensorType({ DT_INT64 })) | |||
.INPUT(offset, TensorType({ DT_INT64 })) | |||
.OUTPUT(y, TensorType({ DT_INT8, DT_UINT8, DT_INT16, DT_UINT16, DT_INT32, DT_UINT32, | |||
DT_INT64, DT_UINT64, DT_BOOL, DT_FLOAT16, DT_FLOAT, DT_DOUBLE, DT_BF16})) | |||
.OP_END_FACTORY_REG(StatelessBernoulli) | |||
/** | |||
*@brief Generates values in an interval . \n | |||
*@par Inputs: | |||
@@ -1041,4 +1041,4 @@ REG_OP(DeserializeManySparse) | |||
.OP_END_FACTORY_REG(DeserializeManySparse) | |||
} // namespace ge | |||
#endif // OPS_BUILT_IN_OP_PROTO_INC_SPARSE_OPS_H_ | |||
#endif // OPS_BUILT_IN_OP_PROTO_INC_SPARSE_OPS_H_ |
@@ -143,6 +143,42 @@ REG_OP(IFFT2D) | |||
.OUTPUT(y, TensorType({DT_COMPLEX64,DT_COMPLEX128})) | |||
.OP_END_FACTORY_REG(IFFT2D) | |||
/** | |||
* @brief Computes the Fourier transform of short overlapping windows of the input. \n | |||
* @par Inputs: | |||
* @li x: A 1-D or 2-D tensor. | |||
* @li window: An optional tensor. The optional window function. Default: None (treated as window of all 1 s) \n | |||
* @par Attributes: | |||
* @li n_fft: A required int. Size of Fourier transform | |||
* @li hop_length: An optional int. The distance between neighboring sliding window frames. | |||
* Default: None (treated as equal to floor(n_fft/4)) | |||
* @li win_length: An optional int. The size of window frame and STFT filter. | |||
* Default: None (treated as equal to n_fft) | |||
* @li normalized: An optional bool. Controls whether to return the normalized STFT results Default: False | |||
* @li onesided: An optional bool. Controls whether to return half of results to avoid redundancy for real inputs. | |||
* Default: True for real input and window, False otherwise. | |||
* @li return_complex: An optional bool. Whether to return a complex tensor, or a real tensor | |||
* with an extra last dimension for the real and imaginary components. \n | |||
* @par Outputs: | |||
* y: A tensor containing the STFT result with shape described above. \n | |||
* @par Third-party framework compatibility | |||
* Compatible with pytorch STFT operator. | |||
*/ | |||
REG_OP(STFT) | |||
.INPUT(x, TensorType({DT_FLOAT, DT_DOUBLE, DT_COMPLEX64, DT_COMPLEX128})) | |||
.OPTIONAL_INPUT(window, TensorType({DT_FLOAT, DT_DOUBLE, DT_COMPLEX64, DT_COMPLEX128})) | |||
.OUTPUT(y, TensorType({DT_FLOAT, DT_DOUBLE, DT_COMPLEX64, DT_COMPLEX128})) | |||
.ATTR(hop_length, Int, 0) | |||
.ATTR(win_length, Int, 0) | |||
.ATTR(normalized, Bool, false) | |||
.ATTR(onesided, Bool, true) | |||
.ATTR(return_complex, Bool, true) | |||
.REQUIRED_ATTR(n_fft, Int) | |||
.OP_END_FACTORY_REG(STFT) | |||
} // namespace ge | |||
#endif // OPS_BUILT_IN_OP_PROTO_INC_SPECTRAL_OPS_H_ |
@@ -79,7 +79,11 @@ typedef enum tagRtPlatformType { | |||
PLATFORM_LHISI_SD3403 = 7, | |||
PLATFORM_MINI_V3 = 8, | |||
PLATFORM_MINI_5612 = 9, | |||
PLATFORM_END = 10, | |||
PLATFORM_CLOUD_V2_910B1 = 10, | |||
PLATFORM_CLOUD_V2_910B2 = 11, | |||
PLATFORM_CLOUD_V2_910B3 = 12, | |||
PLATFORM_CLOUD_V2_910B4 = 13, | |||
PLATFORM_END = 14, | |||
} rtPlatformType_t; | |||
typedef enum tagRtCubeFracMKNFp16 { | |||
@@ -166,6 +166,19 @@ typedef enum tagRtDumpKind { | |||
RT_DATA_DUMP_KIND_RESERVED = 1, | |||
} rtDumpKind_t; | |||
/** | |||
* @ingroup rt_kernel | |||
* @brief rt kernel type | |||
*/ | |||
typedef enum rtKernelType { | |||
KERNEL_TYPE_CCE = 0, | |||
KERNEL_TYPE_FWK = 1, | |||
KERNEL_TYPE_AICPU = 2, | |||
KERNEL_TYPE_AICPU_CUSTOM = 4, | |||
KERNEL_TYPE_HWTS = 10, | |||
KERNEL_TYPE_RESERVED = 99, | |||
} rtKernelType_t; | |||
/** | |||
* @ingroup rt_kernel | |||
* @brief report callback | |||
@@ -523,6 +536,23 @@ RTS_API rtError_t rtAicpuKernelLaunchWithFlag(const rtKernelLaunchNames_t *launc | |||
const rtArgsEx_t *argsInfo, rtSmDesc_t *smDesc, rtStream_t stm, | |||
uint32_t flags); | |||
/** | |||
* @ingroup rtAicpuKernelLaunchEx | |||
* @brief launch cpu kernel to device with dump identifier and kernelType | |||
* @param [in] kernelType aicpu kernel type | |||
* @param [in] launchNames names address for kernel launch | |||
* @param [in] blockDim block dimentions | |||
* @param [in] argsInfo argments address for kernel function | |||
* @param [in] smDesc shared memory description | |||
* @param [in] stm associated stream | |||
* @param [in] flags dump flag or others function flag | |||
* @return RT_ERROR_NONE for ok | |||
* @return RT_ERROR_INVALID_VALUE for error input | |||
*/ | |||
RTS_API rtError_t rtAicpuKernelLaunchEx(uint32_t kernelType, const rtKernelLaunchNames_t *launchNames, | |||
uint32_t blockDim, const rtArgsEx_t *argsInfo, rtSmDesc_t *smDesc, | |||
rtStream_t stm, uint32_t flags); | |||
/** | |||
* @ingroup rt_kernel | |||
* @brief L1 fusion dump addr transfered to device | |||
@@ -31,6 +31,7 @@ extern "C" { | |||
#define RT_MEMORY_TS (0x40U) // Used for Ts memory | |||
#define RT_MEMORY_TS_4G (0x40U) // Used for Ts memory(only 1951) | |||
#define RT_MEMORY_HOST (0x81U) // Memory on host | |||
#define RT_MEMORY_SVM (0x90U) // Memory for SVM | |||
#define RT_MEMORY_RESERVED (0x100U) | |||
#define RT_MEMORY_L1 (0x1U << 16U) | |||
@@ -49,6 +49,7 @@ typedef enum tagModelTaskType { | |||
RT_MODEL_TASK_BARRIER, | |||
RT_MODEL_TASK_NPU_GET_FLOAT_STATUS, | |||
RT_MODEL_TASK_NPU_CLEAR_FLOAT_STATUS, | |||
RT_MODEL_TASK_DVPP, | |||
} rtModelTaskType_t; | |||
typedef enum tagModelStreamType { | |||
@@ -1,13 +1,20 @@ | |||
/* | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2019-2021. All rights reserved. | |||
* Description: handle perf data | |||
* Author: xp | |||
* Create: 2019-10-13 | |||
/** | |||
* @file prof_callback.h | |||
* | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2019-2022. All rights reserved. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |||
* | |||
*/ | |||
#ifndef MSPROFILER_PROF_CALLBACK_H_ | |||
#define MSPROFILER_PROF_CALLBACK_H_ | |||
#include <stddef.h> | |||
#include <stdint.h> | |||
#ifdef __cplusplus | |||
extern "C" { | |||
#endif // __cplusplus | |||
@@ -18,9 +25,6 @@ extern "C" { | |||
#define MSVP_PROF_API __attribute__((visibility("default"))) | |||
#endif | |||
#include "stddef.h" | |||
#include "stdint.h" | |||
/** | |||
* @name MsprofErrorCode | |||
* @brief error code | |||
@@ -170,7 +174,7 @@ MSVP_PROF_API int32_t MsprofInit(uint32_t moduleId, void *data, uint32_t dataLen | |||
* @param moduleId [IN] module Id | |||
* @param handle [IN] the pointer of callback | |||
*/ | |||
MSVP_PROF_API int32_t MsprofRegisterCallback(uint32_t moduleId, ProfCommandHandle callback); | |||
MSVP_PROF_API int32_t MsprofRegisterCallback(uint32_t moduleId, ProfCommandHandle handle); | |||
/* | |||
* @name profReportData | |||
* @brief start reporter/stop reporter/report date | |||
@@ -1,23 +1,27 @@ | |||
/* | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2019-2021. All rights reserved. | |||
* Description: handle perf data | |||
* Author: Huawei Technologies Co., Ltd. | |||
* Create: 2019-10-13 | |||
/** | |||
* @file prof_common.h | |||
* | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2019-2022. All rights reserved. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |||
* | |||
*/ | |||
#ifndef MSPROFILER_PROF_COMMON_H_ | |||
#define MSPROFILER_PROF_COMMON_H_ | |||
#include <stdint.h> | |||
#ifdef __cplusplus | |||
extern "C" { | |||
#endif // __cplusplus | |||
#include <stdint.h> | |||
#define MSPROF_DATA_HEAD_MAGIC_NUM 0x5a5a | |||
enum MsprofDataTag { | |||
MSPROF_ACL_DATA_TAG = 0, //acl data tag, range: 0~19 | |||
MSPROF_GE_DATA_TAG_MODEL_LOAD = 20, //ge data tag, range: 20~39 | |||
MSPROF_ACL_DATA_TAG = 0, // acl data tag, range: 0~19 | |||
MSPROF_GE_DATA_TAG_MODEL_LOAD = 20, // ge data tag, range: 20~39 | |||
MSPROF_GE_DATA_TAG_FUSION = 21, | |||
MSPROF_GE_DATA_TAG_INFER = 22, | |||
MSPROF_GE_DATA_TAG_TASK = 23, | |||
@@ -25,14 +29,14 @@ enum MsprofDataTag { | |||
MSPROF_GE_DATA_TAG_STEP = 25, | |||
MSPROF_GE_DATA_TAG_ID_MAP = 26, | |||
MSPROF_GE_DATA_TAG_HOST_SCH = 27, | |||
MSPROF_RUNTIME_DATA_TAG_API = 40, //runtime data tag, range: 40~59 | |||
MSPROF_RUNTIME_DATA_TAG_API = 40, // runtime data tag, range: 40~59 | |||
MSPROF_RUNTIME_DATA_TAG_TRACK = 41, | |||
MSPROF_AICPU_DATA_TAG = 60, //aicpu data tag, range: 60~79 | |||
MSPROF_AICPU_DATA_TAG = 60, // aicpu data tag, range: 60~79 | |||
MSPROF_AICPU_MODEL_TAG = 61, | |||
MSPROF_HCCL_DATA_TAG = 80, //hccl data tag, range: 80~99 | |||
MSPROF_DP_DATA_TAG = 100, //dp data tag, range: 100~119 | |||
MSPROF_MSPROFTX_DATA_TAG = 120, //hccl data tag, range: 120~139 | |||
MSPROF_DATA_TAG_MAX = 65536, //data tag value type is uint16_t | |||
MSPROF_HCCL_DATA_TAG = 80, // hccl data tag, range: 80~99 | |||
MSPROF_DP_DATA_TAG = 100, // dp data tag, range: 100~119 | |||
MSPROF_MSPROFTX_DATA_TAG = 120, // hccl data tag, range: 120~139 | |||
MSPROF_DATA_TAG_MAX = 65536, // data tag value type is uint16_t | |||
}; | |||
/** | |||
@@ -154,6 +158,8 @@ enum MsprofGeTaskType { | |||
MSPROF_GE_TASK_TYPE_AI_CORE = 0, | |||
MSPROF_GE_TASK_TYPE_AI_CPU, | |||
MSPROF_GE_TASK_TYPE_AIV, | |||
MSPROF_GE_TASK_TYPE_WRITE_BACK, | |||
MSPROF_GE_TASK_TYPE_INVALID | |||
}; | |||
enum MsprofGeShapeType { | |||
MSPROF_GE_SHAPE_TYPE_STATIC = 0, | |||
@@ -368,11 +374,11 @@ struct MsprofHcclProfReduce { | |||
uint64_t src; | |||
uint64_t dst; | |||
uint64_t size; | |||
uint32_t op; // {0: sum, 1: mul, 2: max, 3: min} | |||
uint32_t dataType; // data type {0: INT8, 1: INT16, 2: INT32, 3: FP16, 4:FP32, 5:INT64, 6:UINT64} | |||
uint32_t linkType; // link type {0: 'OnChip', 1: 'HCCS', 2: 'PCIe', 3: 'RoCE'} | |||
uint32_t op; // {0: sum, 1: mul, 2: max, 3: min} | |||
uint32_t dataType; // data type {0: INT8, 1: INT16, 2: INT32, 3: FP16, 4:FP32, 5:INT64, 6:UINT64} | |||
uint32_t linkType; // link type {0: 'OnChip', 1: 'HCCS', 2: 'PCIe', 3: 'RoCE'} | |||
uint32_t remoteRank; | |||
uint32_t transportType; // transport type {0: SDMA, 1: RDMA, 2:LOCAL} | |||
uint32_t transportType; // transport type {0: SDMA, 1: RDMA, 2:LOCAL} | |||
uint32_t role; // role {0: dst, 1:src} | |||
double durationEstimated; | |||
}; | |||
@@ -383,9 +389,9 @@ struct MsprofHcclProfRDMA { | |||
uint64_t dst; | |||
uint64_t size; | |||
uint64_t notifyID; | |||
uint32_t linkType; // link type {0: 'OnChip', 1: 'HCCS', 2: 'PCIe', 3: 'RoCE'} | |||
uint32_t linkType; // link type {0: 'OnChip', 1: 'HCCS', 2: 'PCIe', 3: 'RoCE'} | |||
uint32_t remoteRank; | |||
uint32_t transportType; // transport type {0: RDMA, 1:SDMA, 2:LOCAL} | |||
uint32_t transportType; // transport type {0: RDMA, 1:SDMA, 2:LOCAL} | |||
uint32_t role; // role {0: dst, 1:src} | |||
uint32_t type; // RDMA type {0: RDMASendNotify, 1:RDMASendPayload} | |||
double durationEstimated; | |||
@@ -397,7 +403,7 @@ struct MsprofHcclProfMemcpy { | |||
uint64_t dst; | |||
uint64_t size; | |||
uint64_t notifyID; | |||
uint32_t linkType; // link type {0: 'OnChip', 1: 'HCCS', 2: 'PCIe', 3: 'RoCE'} | |||
uint32_t linkType; // link type {0: 'OnChip', 1: 'HCCS', 2: 'PCIe', 3: 'RoCE'} | |||
uint32_t remoteRank; | |||
uint32_t transportType; // transport type {0: RDMA, 1:SDMA, 2:LOCAL} | |||
uint32_t role; // role {0: dst, 1:src} | |||
@@ -448,18 +454,17 @@ struct MsprofStampInfo { | |||
uint16_t dataTag; | |||
uint32_t processId; | |||
uint32_t threadId; | |||
uint32_t category; //marker category | |||
uint32_t category; // marker category | |||
uint32_t eventType; | |||
int32_t payloadType; | |||
union PayloadValue //payload info for marker | |||
{ | |||
union PayloadValue { | |||
uint64_t ullValue; | |||
int64_t llValue; | |||
double dValue; | |||
uint32_t uiValue[2]; | |||
int32_t iValue[2]; | |||
float fValue[2]; | |||
} payload; | |||
} payload; // payload info for marker | |||
uint64_t startTime; | |||
uint64_t endTime; | |||
int32_t messageType; | |||
@@ -1,17 +1,12 @@ | |||
/** | |||
* Copyright 2019-2020 Huawei Technologies Co., Ltd | |||
* @file prof_engine.h | |||
* | |||
* 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 | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2019-2022. All rights reserved. | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |||
* | |||
* 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 MSPROF_ENGINE_PROF_ENGINE_H_ | |||
@@ -35,7 +30,7 @@ namespace Engine { | |||
* record config info | |||
*/ | |||
struct ModuleJobConfig { | |||
std::map<std::string, std::string> switches; /**< key is the config name, value is the config value(on or off) */ | |||
std::map<std::string, std::string> switches; /**< key is the config name, value is the config value(on or off) */ | |||
}; | |||
/** | |||
@@ -48,59 +43,59 @@ struct ModuleJobConfig { | |||
* @brief class PluginIntf | |||
*/ | |||
class MSVP_PROF_API PluginIntf { | |||
public: | |||
virtual ~PluginIntf() {} | |||
public: | |||
/** | |||
* @ingroup PluginIntf | |||
* @name : Init | |||
* @brief : API of user plugin, libmsporf call this API to send a Reporter to user plugin | |||
* @par description : | |||
* API of user plugin, libmsporf call this API to send a Reporter to user plugin. | |||
* @param reporter [IN] const Reporter* the Reporter from libmsprof | |||
* @retval PROFILING_SUCCESS 0 (success) | |||
* @retval PROFILING_FAILED -1 (failed) | |||
* | |||
* @par depend: | |||
* @li libmsprof | |||
* @li prof_engine.h | |||
* @since c60 | |||
* @see UnInit | |||
*/ | |||
virtual int Init(const Reporter *reporter) = 0; | |||
/** | |||
* @ingroup PluginIntf | |||
* @name : OnNewConfig | |||
* @brief : API of user plugin, libmsprof call this API to send config info to user plugin \n | |||
If the user plugin needn't config, no need to redefine this function | |||
* @param config [IN] const ModuleJobConfig * the config from libmsprof | |||
* @retval PROFILING_SUCCESS 0 (success) | |||
* @retval PROFILING_FAILED -1 (failed) | |||
* | |||
* @par depend: | |||
* @li libmsprof | |||
* @li prof_engine.h | |||
* @since c60 | |||
* @see Init | UnInit | |||
*/ | |||
virtual int OnNewConfig(const ModuleJobConfig *config) { return 0; } | |||
/** | |||
* @ingroup PluginIntf | |||
* @name : UnInit | |||
* @brief : API of user plugin, libmsprof call this API to notify plugin stop to send data | |||
* @retval PROFILING_SUCCESS 0 (success) | |||
* @retval PROFILING_FAILED -1 (failed) | |||
* | |||
* @par depend: | |||
* @li libmsprof | |||
* @li prof_engine.h | |||
* @since c60 | |||
* @see Init | |||
*/ | |||
virtual int UnInit() = 0; | |||
public: | |||
virtual ~PluginIntf() {} | |||
public: | |||
/** | |||
* @ingroup PluginIntf | |||
* @name : Init | |||
* @brief : API of user plugin, libmsporf call this API to send a Reporter to user plugin | |||
* @par description : | |||
* API of user plugin, libmsporf call this API to send a Reporter to user plugin. | |||
* @param reporter [IN] const Reporter* the Reporter from libmsprof | |||
* @retval PROFILING_SUCCESS 0 (success) | |||
* @retval PROFILING_FAILED -1 (failed) | |||
* | |||
* @par depend: | |||
* @li libmsprof | |||
* @li prof_engine.h | |||
* @since c60 | |||
* @see UnInit | |||
*/ | |||
virtual int Init(const Reporter *reporter) = 0; | |||
/** | |||
* @ingroup PluginIntf | |||
* @name : OnNewConfig | |||
* @brief : API of user plugin, libmsprof call this API to send config info to user plugin \n | |||
If the user plugin needn't config, no need to redefine this function | |||
* @param config [IN] const ModuleJobConfig * the config from libmsprof | |||
* @retval PROFILING_SUCCESS 0 (success) | |||
* @retval PROFILING_FAILED -1 (failed) | |||
* | |||
* @par depend: | |||
* @li libmsprof | |||
* @li prof_engine.h | |||
* @since c60 | |||
* @see Init | UnInit | |||
*/ | |||
virtual int OnNewConfig(const ModuleJobConfig *config) = 0; | |||
/** | |||
* @ingroup PluginIntf | |||
* @name : UnInit | |||
* @brief : API of user plugin, libmsprof call this API to notify plugin stop to send data | |||
* @retval PROFILING_SUCCESS 0 (success) | |||
* @retval PROFILING_FAILED -1 (failed) | |||
* | |||
* @par depend: | |||
* @li libmsprof | |||
* @li prof_engine.h | |||
* @since c60 | |||
* @see Init | |||
*/ | |||
virtual int UnInit() = 0; | |||
}; | |||
/** | |||
@@ -113,39 +108,39 @@ class MSVP_PROF_API PluginIntf { | |||
* @brief class EngineIntf | |||
*/ | |||
class MSVP_PROF_API EngineIntf { | |||
public: | |||
virtual ~EngineIntf() {} | |||
public: | |||
/** | |||
* @ingroup EngineIntf | |||
* @name : CreatePlugin | |||
* @brief : API of user engine, libmsporf call this API to get a plugin | |||
* @retval PluginIntf * The pointer of the new plugin | |||
* | |||
* @par depend: | |||
* @li libmsprof | |||
* @li prof_engine.h | |||
* @since c60 | |||
* @see ReleasePlugin | |||
*/ | |||
virtual PluginIntf *CreatePlugin() = 0; | |||
/** | |||
* @ingroup EngineIntf | |||
* @name : ReleasePlugin | |||
* @brief : API of user engine, libmsprof call this API to release a plugin | |||
* @param plugin [IN] PluginIntf * the plugin to release | |||
* @retval PROFILING_SUCCESS 0 (success) | |||
* @retval PROFILING_FAILED -1 (failed) | |||
* | |||
* @par depend: | |||
* @li libmsprof | |||
* @li prof_engine.h | |||
* @since c60 | |||
* @see CreatePlugin | |||
*/ | |||
virtual int ReleasePlugin(PluginIntf *plugin) = 0; | |||
public: | |||
virtual ~EngineIntf() {} | |||
public: | |||
/** | |||
* @ingroup EngineIntf | |||
* @name : CreatePlugin | |||
* @brief : API of user engine, libmsporf call this API to get a plugin | |||
* @retval PluginIntf * The pointer of the new plugin | |||
* | |||
* @par depend: | |||
* @li libmsprof | |||
* @li prof_engine.h | |||
* @since c60 | |||
* @see ReleasePlugin | |||
*/ | |||
virtual PluginIntf *CreatePlugin() = 0; | |||
/** | |||
* @ingroup EngineIntf | |||
* @name : ReleasePlugin | |||
* @brief : API of user engine, libmsprof call this API to release a plugin | |||
* @param plugin [IN] PluginIntf * the plugin to release | |||
* @retval PROFILING_SUCCESS 0 (success) | |||
* @retval PROFILING_FAILED -1 (failed) | |||
* | |||
* @par depend: | |||
* @li libmsprof | |||
* @li prof_engine.h | |||
* @since c60 | |||
* @see CreatePlugin | |||
*/ | |||
virtual int ReleasePlugin(PluginIntf *plugin) = 0; | |||
}; | |||
/** | |||
@@ -1,17 +1,8 @@ | |||
/** | |||
* 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. | |||
/* | |||
* Copyright (c) Huawei Technologies Co., Ltd. 2019-2021. All rights reserved. | |||
* Description: handle perf data | |||
* Author: xp | |||
* Create: 2019-10-13 | |||
*/ | |||
#ifndef MSPROF_ENGINE_PROF_REPORTER_H | |||
@@ -81,4 +72,4 @@ public: | |||
} // namespace Engine | |||
} // namespace Msprof | |||
#endif // MSPROF_ENGINE_PROF_REPORTER_H_ | |||
#endif // MSPROF_ENGINE_PROF_REPORTER_H |
@@ -207,6 +207,8 @@ enum { | |||
HSS, /**< helper */ | |||
FFTS, | |||
OP, | |||
UDF, | |||
HICAID, | |||
INVLID_MOUDLE_ID | |||
}; | |||