sync-from-trunk-to-blue-zone-1009

pull/187/head
wuweikang 4 years ago committed by taoxiangdong
parent a2ec076850
commit 1a651a4e57

@ -70,9 +70,10 @@ LOCAL_SHARED_LIBRARIES := \
libregister \
libge_compiler \
libge_common \
libmsprof
libmsprof \
stub/libascend_hal
LOCAL_STATIC_LIBRARIES := libmsprofiler
LOCAL_LDFLAGS := -lrt -ldl
@ -107,6 +108,7 @@ LOCAL_SHARED_LIBRARIES := \
libge_common \
libmsprof
LOCAL_STATIC_LIBRARIES := libmsprofiler
LOCAL_LDFLAGS := -lrt -ldl
LOCAL_CFLAGS += \

@ -58,8 +58,6 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ge::Status ProfilingManager::In
GELOGI("ProfilingManager::Init job_id:%s", job_id_.c_str());
Status ret;
if (!recv_profiling_config_.empty()) {
GELOGI("Profiling json config from acl:%s", recv_profiling_config_.c_str());

@ -92,6 +92,7 @@ local_ge_executor_shared_library := \
libregister \
libmsprof \
liberror_manager \
libascend_hal
local_ge_executor_ldflags := -lrt -ldl \

@ -907,7 +907,6 @@ Status GraphMemoryAssigner::ReAssignAtomicMemory(bool is_loop_graph) {
int64_t atomic_mem_start = static_cast<int64_t>(mem_iter->second.mem_offset_);
GELOGD("Begin to reAssign atomic memory, atomic address memory start = %ld", atomic_mem_start);
for (auto &atomic_node : iter.second) {
vector<int64_t> mem_offset_end;
status = AssignAtomicOutputAndWorkspaceMemory(atomic_node, mem_offset_end);
if (status != SUCCESS) {

@ -137,6 +137,9 @@ class GraphMemoryAssigner {
ge::Status ReAssignAtomicMemory(bool is_loop_graph);
ge::Status FilterAtomicNodesForMemoryAssign(std::map<NodePtr, vector<NodePtr>> &normal_atomic_nodes_map,
std::vector<NodePtr> &connecting_output_atomic_nodes);
ge::Status FilterAtomicNodesForMemoryAssign(std::map<NodePtr, vector<NodePtr>> &normal_atomic_nodes_map,
std::vector<NodePtr> &connecting_output_atomic_nodes);

@ -728,11 +728,7 @@ Status DataDumper::BuildTaskInfo(aicpu::dump::OpMappingInfo &op_mapping_info) {
}
if (dump_properties_.GetDumpMode() == kDumpInput) {
if (op_iter.is_task) {
Status ret = DumpInput(op_iter, task);
if (ret != SUCCESS) {
GELOGE(ret, "Dump input failed");
return ret;
}
GE_CHK_STATUS_RET(DumpInput(op_iter, task), "Dump input failed");
}
op_mapping_info.mutable_task()->Add(std::move(task));
continue;

@ -236,7 +236,6 @@ ModelManager::~ModelManager() {
std::lock_guard<std::mutex> lock(map_mutex_);
model_map_.clear();
model_aicpu_kernel_.clear();
cust_aicpu_so_.clear();
GE_IF_BOOL_EXEC(device_count > 0, GE_CHK_RT(rtDeviceReset(0)));
}
@ -400,6 +399,7 @@ Status ModelManager::Unload(uint32_t model_id) {
}
std::lock_guard<std::mutex> lock(exeception_infos_mutex_);
exception_infos_.clear();
cust_aicpu_so_.clear();
return SUCCESS;
}

@ -40,7 +40,6 @@
#include "inc/pass_manager.h"
#include "graph/common/local_context.h"
using std::map;
using std::set;
using std::string;
using std::vector;
@ -264,24 +263,27 @@ Status MultiBatchGraphCopyer::Init() {
}
Status MultiBatchGraphCopyer::LabelStatus() {
map<string, vector<NodePtr>> frame_enters;
InitStatus(frame_enters);
for (const auto &data : origin_data_nodes_) {
auto data_shape = NodeUtils::GetOutputDesc(*data, kDataOutIndex).GetShape();
if (!IsAllDimsPositive(data_shape.GetDims())) {
origin_nodes_status_[data.get()] = kNodeInBatchBranch;
}
}
bool changed = true;
// If anyone of in node is kNodeInBatchBranch, it is also kNodeInBatchBranch
while (changed) {
changed = false;
for (const auto &node : origin_all_nodes_) {
auto iter = origin_nodes_status_.find(node.get());
if (iter != origin_nodes_status_.end()) {
continue;
}
for (auto &in_node : node->GetInAllNodes()) {
bool is_in_batch = origin_nodes_status_.find(in_node.get()) != origin_nodes_status_.end() &&
origin_nodes_status_[in_node.get()] == kNodeInBatchBranch;
if (is_in_batch) {
if (origin_nodes_status_.find(node.get()) == origin_nodes_status_.end() ||
origin_nodes_status_[node.get()] != kNodeInBatchBranch) {
origin_nodes_status_[node.get()] = kNodeInBatchBranch;
ResetEnterStatus(frame_enters, node);
changed = true;
}
origin_nodes_status_[node.get()] = kNodeInBatchBranch;
changed = true;
break;
}
}

@ -69,8 +69,6 @@ class MultiBatchGraphCopyer {
// label status for origin_all_nodes_
Status LabelStatus();
void InitStatus(std::map<string, vector<NodePtr>> &frame_enters);
void ResetEnterStatus(std::map<string, vector<NodePtr>> &frame_enters, const NodePtr &node);
// add nodes functions
Status CreateNewNodes();

@ -61,8 +61,10 @@ class StringUtils {
/// @param [in] delim separator
/// @return string array after segmentation
///
/*lint -e1077*/
static std::vector<std::string> Split(const std::string &str, char delim) {
std::vector<std::string> elems;
/*lint +e1077*/
if (str.empty()) {
elems.emplace_back("");

@ -25,16 +25,21 @@
namespace ge {
/**
*@brief Performs AI pre-processing (AIPP) on images including color space conversion (CSC),
image normalization (by subtracting the mean value or multiplying a factor), image cropping
(by specifying the crop start and cropping the image to the size required by the neural network), and much more. \n
*@brief Performs AI pre-processing (AIPP) on images including color space
conversion (CSC),
image normalization (by subtracting the mean value or multiplying a factor),
image cropping
(by specifying the crop start and cropping the image to the size required by
the neural network), and much more. \n
*@par Inputs:
*@li images: An NCHW or NHWC tensor of type uint8, specifying the input to the data layer.
*@li images: An NCHW or NHWC tensor of type uint8, specifying the input to the
data layer.
*@li params: Dynamic AIPP configuration parameters of type uint8. \n
*@par Attributes:
*aipp_config_path: A required string, specifying the path of the AIPP configuration file. \n
*aipp_config_path: A required string, specifying the path of the AIPP
configuration file. \n
*@par Outputs:
*features: The AIPP-processed output tensor of type float16 or uint8.

File diff suppressed because it is too large Load Diff

@ -36,7 +36,7 @@ namespace ge {
* if "cond" is a numerical scalar, non-zero means True and zero means False;
* if "cond" is a string scalar, non-empty means True and empty means False;
* if "cond" is not a scalar, non-empty means True and empty means False.
*@li input: The input tensors . It's a dynamic input. \n
*@li input: The input tensors . \n
*@par Graphs:
*@li then_branch: A subgraph takes 'input' and returns a list of tensors,
@ -69,7 +69,7 @@ REG_OP(_If)
* if "cond" is a numerical scalar, non-zero means True and zero means False;
* if "cond" is a string scalar, non-empty means True and empty means False;
* if "cond" is not a scalar, non-empty means True and empty means False.
*@li input: The input tensors . It's a dynamic input. \n
*@li input: The input tensors . \n
*@par Graphs:
*@li then_branch: A subgraph takes 'input' and returns a list of tensors,
@ -102,7 +102,7 @@ REG_OP(StatelessIf)
* if "cond" is a numerical scalar, non-zero means True and zero means False;
* if "cond" is a string scalar, non-empty means True and empty means False;
* if "cond" is not a scalar, non-empty means True and empty means False.
*@li input: The input tensors . It's a dynamic input. \n
*@li input: The input tensors . \n
*@par Graphs:
*@li then_branch: A subgraph takes 'input' and returns a list of tensors,
@ -129,7 +129,7 @@ REG_OP(If)
*@par Inputs:
*@li branch_index: A int32 scalar which determines the selected subgraph.
*@li input: The input tensors, which will be passed to the subgraph . It's a dynamic input. \n
*@li input: The input tensors, which will be passed to the subgraph . \n
*@par Graphs:
*branches: A list of subgraphs, each of which takes 'input' and returns a list of tensors,
@ -152,7 +152,7 @@ REG_OP(Case)
*@brief Cyclic execute the "body" subgraph until the return tensor of "cond" subgraph means False . \n
*@par Inputs:
*input: The input tensors . It's a dynamic input. \n
*input: The input tensors . \n
*@par Graphs:
*@li cond: A subgraph takes 'input' and returns a tensor.
@ -183,7 +183,7 @@ REG_OP(_While)
*@brief Cyclic execute the "body" subgraph until the return tensor of "cond" subgraph means False . \n
*@par Inputs:
*input: The input tensors . It's a dynamic input. \n
*input: The input tensors . \n
*@par Graphs:
*@li cond: A subgraph takes 'input' and returns a tensor.
@ -215,7 +215,7 @@ REG_OP(While)
*@brief Cyclic execute the "body" subgraph until the return tensor of "cond" subgraph means False . \n
*@par Inputs:
*input: The input tensors . It's a dynamic input. \n
*input: The input tensors . \n
*@par Graphs:
*@li cond: A subgraph takes 'input' and returns a tensor.
@ -250,7 +250,7 @@ REG_OP(StatelessWhile)
*@li start: A int32 scalar. The lower bound.
*@li limit: A int32 scalar. The upper bound.
*@li delta: A int32 scalar. The step size.
*@li input: The input tensors, which will be passed to "body" . It's a dynamic input. \n
*@li input: The input tensors, which will be passed to "body" . \n
*@par Graphs:
*body: A subgraph takes 'input' and returns a another list of tensors . \n
@ -274,7 +274,7 @@ REG_OP(For)
*@brief Pass the input tensors to the subgraph "f" and return the output tensors . \n
*@par Inputs:
*args: The input tensors, which will be passed to "f" . It's a dynamic input. \n
*args: The input tensors, which will be passed to "f" . \n
*@par Graphs:
*f: A subgraph takes 'args' and returns a another list of tensors . \n
@ -303,7 +303,7 @@ REG_OP(PartitionedCall)
*@brief Pass the input tensors to the subgraph "f" and return the output tensors . \n
*@par Inputs:
*args: The input tensors, which will be passed to "f" . It's a dynamic input. \n
*args: The input tensors, which will be passed to "f" . \n
*@par Graphs:
*f: A subgraph takes 'args' and returns a another list of tensors . \n

@ -160,8 +160,10 @@ REG_OP(CropAndResize)
*@li box_index: A Tensor of type int32. A 1-D tensor of shape [num_boxes] with int32 values in [0, batch) . \n
*@par Attributes:
*@li crop_size: list int. [crop_height, crop_width]. All cropped image patches are resized to this size.
*@li extrapolation_value: An optional float. Defaults to 0. Value used for extrapolation, when applicable.
*@li crop_size: list int. [crop_height, crop_width]. All cropped image patches
are resized to this size.
*@li extrapolation_value: An optional float. Defaults to 0. Value used for
extrapolation, when applicable.
*@li method: An optional string from: '"bilinear"'. Defaults to "bilinear" . \n
*@par Outputs:
@ -172,7 +174,6 @@ REG_OP(CropAndResize)
*@par Third-party framework compatibility
*Compatible with tensorflow CropAndResize operator.
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use CropAndResize instead.
*/

@ -87,39 +87,58 @@ REG_OP(L2NormalizeGrad)
*@par Inputs:
* Five inputs, including: (NHWC, NCHW, or NC1HWC0 supported)
*@li x: A 4D or 5D Tensor of type float16 or float32, with format NHWC or NCHW for 4D or NC1HWC0 for 5D.
*@li scale: A Tensor of type float32. Must be 1D if input "x" is with format NHWC or NCHW. Must be 5D
*@li x: A 4D or 5D Tensor of type float16 or float32, with format NHWC or NCHW
for 4D or NC1HWC0 for 5D.
*@li scale: A Tensor of type float32. Must be 1D if input "x" is with format
NHWC or NCHW. Must be 5D
if input "x" is with format NC1HWC0. Specifies the scaling factor.
*@li offset: A Tensor of type float32. Must be 1D if input "x" is with format NHWC or NCHW. Must be 5D
if input "x" is with format NC1HWC0. Specifies the offset.
*@li mean: A Tensor of type float32. Must be 1D if input "x" is with format NHWC or NCHW. Must be 5D
if input "x" is with format NC1HWC0. Specifies the mean used for inference. Must be "None" if the
*@li mean: A Tensor of type float32. Must be 1D if input "x" is with format
NHWC or NCHW. Must be 5D
if input "x" is with format NC1HWC0. Specifies the mean used for inference.
Must be "None" if the
operation is used for training.
*@li variance: A Tensor of type float32. Must be 1D if input "x" is with format NHWC or NCHW. Must be
5D if input "x" is with format NC1HWC0. Specifies the variance used for inference. Must be "None"
*@li variance: A Tensor of type float32. Must be 1D if input "x" is with format
NHWC or NCHW. Must be
5D if input "x" is with format NC1HWC0. Specifies the variance used for
inference. Must be "None"
if the operation is used for training . \n
*@par Attributes:
*@li epsilon: An optional float32, specifying the small value added to variance to avoid dividing by zero. Defaults to "0.0001".
*@li data_format: An optional string, specifying the format of "x". Defaults to "NHWC".
*@li is_training: An optional bool, specifying if the operation is used for training or inference. Defaults to "True" . \n
*@li epsilon: An optional float32, specifying the small value added to variance
to avoid dividing by zero. Defaults to "0.0001".
*@li data_format: An optional string, specifying the format of "x". Defaults to
"NHWC".
*@li is_training: An optional bool, specifying if the operation is used for
training or inference. Defaults to "True" . \n
*@par Outputs:
* Five outputs, including: (NHWC, NCHW, or NC1HWC0 supported)
*@li y: A 4D or 5D Tensor of type float16 or float32 for the normalized "x", with format NHWC or NCHW for 4D or NC1HWC0 for 5D.
*@li batch_mean: A Tensor of type float32. Must be 1D if input "x" is with format NHWC or NCHW. Must be 5D
*@li y: A 4D or 5D Tensor of type float16 or float32 for the normalized "x",
with format NHWC or NCHW for 4D or NC1HWC0 for 5D.
*@li batch_mean: A Tensor of type float32. Must be 1D if input "x" is with
format NHWC or NCHW. Must be 5D
if input "x" is with format NC1HWC0. Specifies the mean of "x".
*@li batch_variance: A Tensor of type float32. Must be 1D if input "x" is with format NHWC or NCHW.
*@li batch_variance: A Tensor of type float32. Must be 1D if input "x" is with
format NHWC or NCHW.
Must be 5D if input "x" is with format NC1HWC0. Specifies the variance of "x".
*@li reserve_space_1: An optional Tensor of type float32. Must be 1D if input "x" is with format NHWC or NCHW.
Must be 5D if input "x" is with format NC1HWC0. Specifies the mean of "x" for gradient computation. Pass "None" to skip this output.
*@li reserve_space_2: An optional Tensor of type float32. Must be 1D if input "x" is with format NHWC or NCHW.
Must be 5D if input "x" is with format NC1HWC0. Specifies the variance of "x" for gradient computation. Pass "None" to skip this output . \n
*@li reserve_space_1: An optional Tensor of type float32. Must be 1D if input
"x" is with format NHWC or NCHW.
Must be 5D if input "x" is with format NC1HWC0. Specifies the mean of "x" for
gradient computation. Pass "None" to skip this output.
*@li reserve_space_2: An optional Tensor of type float32. Must be 1D if input
"x" is with format NHWC or NCHW.
Must be 5D if input "x" is with format NC1HWC0. Specifies the variance of "x"
for gradient computation. Pass "None" to skip this output . \n
*@attention Constraints:
*@li If the operation is used for inference and outputs "reserve_space_1" and "reserve_space_2" are available,
then "reserve_space_1" has the same value as "mean" and "reserve_space_2" has the same value as "variance".
*@li For Ascend 310, the result accuracy fails to reach 1 due to the square root instruction . \n
*@li If the operation is used for inference and outputs "reserve_space_1" and
"reserve_space_2" are available,
then "reserve_space_1" has the same value as "mean" and "reserve_space_2" has
the same value as "variance".
*@li For Ascend 310, the result accuracy fails to reach 1 due to the square
root instruction . \n
*@par Third-party framework compatibility
*@li Compatible with the TensorFlow operator fused_batch_norm.
@ -166,13 +185,17 @@ is used for training or inference. Defaults to "True" . \n
*@li y: A 4D Tensor of type float16 or float32, for the normalized "x".
*@li batch_mean: A 1D Tensor of type float32, for the mean of "x".
*@li batch_variance: A 1D Tensor of type float32, for the variance of "x".
*@li reserve_space_1: A 1D Tensor of type float32, for the mean of "x" for gradient computation.
*@li reserve_space_2: A 1D Tensor of type float32, for the variance of "x" for gradient computation . \n
*@li reserve_space_1: A 1D Tensor of type float32, for the mean of "x" for
gradient computation.
*@li reserve_space_2: A 1D Tensor of type float32, for the variance of "x"
for gradient computation . \n
*@attention Constraints:
*@li If the operation is used for inference, then output "reserve_space_1"
has the same value as "mean" and output "reserve_space_2" has the same value as "variance".
*@li For Ascend 310, the result accuracy fails to reach 1 due to the square root instruction . \n
has the same value as "mean" and output "reserve_space_2" has the same value as
"variance".
*@li For Ascend 310, the result accuracy fails to reach 1â° due to the square
root instruction . \n
*@par Third-party framework compatibility
* Compatible with the TensorFlow operator fused_batch_norm_v2.
@ -198,23 +221,34 @@ REG_OP(BatchNormExt2)
*@par Inputs:
* Five inputs, including:
*@li y_backprop: A 4D or 5D Tensor of type float16 or float32, with format NHWC, NCHW, or NC1HWC0, for the gradient.
*@li x: A 4D or 5D Tensor of type float16 or float32, with format NHWC, NCHW, or NC1HWC0.
*@li scale: A 4D or 5D Tensor of type float32, with format NHWC, NCHW, or NC1HWC0.
*@li reserve_space_1: A 4D or 5D Tensor of type float32, with format NHWC, NCHW, or NC1HWC0. It is an output of BatchNorm.
*@li reserve_space_2: A 4D or 5D Tensor of type float32, with format NHWC, NCHW, or NC1HWC0. It is an output of BatchNorm . \n
*@li y_backprop: A 4D or 5D Tensor of type float16 or float32, with format
NHWC, NCHW, or NC1HWC0, for the gradient.
*@li x: A 4D or 5D Tensor of type float16 or float32, with format NHWC, NCHW,
or NC1HWC0.
*@li scale: A 4D or 5D Tensor of type float32, with format NHWC, NCHW, or
NC1HWC0.
*@li reserve_space_1: A 4D or 5D Tensor of type float32, with format NHWC,
NCHW, or NC1HWC0. It is an output of BatchNorm.
*@li reserve_space_2: A 4D or 5D Tensor of type float32, with format NHWC,
NCHW, or NC1HWC0. It is an output of BatchNorm . \n
*@par Attributes:
*@li epsilon: An optional float32. Defaults to "0.0001". A small float number added to the variance of "x".
*@li epsilon: An optional float32. Defaults to "0.0001". A small float number
added to the variance of "x".
*@li data_format: An optional string. Defaults to "NHWC".
*@li is_training: An optional bool. Defaults to "true". Specifies the operation is for training (default) or inference . \n
*@par Outputs:
*@li x_backprop: A Tensor of type float16 or float32, with format NHWC, NCHW, or NC1HWC0, for the offset of "x".
*@li scale_backprop: A Tensor of type float32, with format NHWC, NCHW, or NC1HWC0, for the offset of "scale".
*@li *offset_backprop: A Tensor of type float32, with format NHWC, NCHW, or NC1HWC0, for the offset of "offset".
*@li *reserve_space_4: A Tensor of type float32, with shape NHWC, NCHW, or NC1HWC0. Pass "None" to skip this output.
*@li *reserve_space_5: A Tensor of type float32, with shape NHWC, NCHW, or NC1HWC0. Pass "None" to skip this output . \n
*@li x_backprop: A Tensor of type float16 or float32, with format NHWC, NCHW,
or NC1HWC0, for the offset of "x".
*@li scale_backprop: A Tensor of type float32, with format NHWC, NCHW, or
NC1HWC0, for the offset of "scale".
*@li *offset_backprop: A Tensor of type float32, with format NHWC, NCHW, or
NC1HWC0, for the offset of "offset".
*@li *reserve_space_4: A Tensor of type float32, with shape NHWC, NCHW, or
NC1HWC0. Pass "None" to skip this output.
*@li *reserve_space_5: A Tensor of type float32, with shape NHWC, NCHW, or
NC1HWC0. Pass "None" to skip this output . \n
*@attention Constraints:
* The preceding layer of this operator must be operator BatchNorm . \n
@ -244,21 +278,28 @@ REG_OP(BatchNormGrad)
*@par Inputs:
* Five inputs, including:
*@li y_backprop: A 4D Tensor of type float16 or float32, with format NHWC or NCHW, for the gradient.
*@li y_backprop: A 4D Tensor of type float16 or float32, with format NHWC or
NCHW, for the gradient.
*@li x: A 4D Tensor of type float16 or float32, with format NHWC or NCHW.
*@li scale: A 4D Tensor of type float32, with format NHWC or NCHW.
*@li reserve_space_1: A 4D Tensor of type float32, with format NHWC or NCHW. It is an output of BatchNormExt2.
*@li reserve_space_2: A 4D Tensor of type float32, with format NHWC or NCHW. It is an output of BatchNormExt2 . \n
*@li reserve_space_1: A 4D Tensor of type float32, with format NHWC or NCHW. It
is an output of BatchNormExt2.
*@li reserve_space_2: A 4D Tensor of type float32, with format NHWC or NCHW. It
is an output of BatchNormExt2 . \n
*@par Attributes:
*@li epsilon: A required float32. A small float number added to the variance of "x".
*@li data_format: A required string for the format.
*@li is_training: A required bool for specifying the operation is for training (true) or inference (false) . \n
*@li is_training: A required bool for specifying the operation is for training
(true) or inference (false) . \n
*@par Outputs:
*@li x_backprop: A Tensor of type float16 or float32, with format NHWC or NCHW, for the offset of "x".
*@li scale_backprop: A Tensor of type float32, with format NHWC or NCHW, for the offset of "scale".
*@li offset_backprop: A Tensor of type float32, with format NHWC or NCHW, for the offset of "offset".
*@li x_backprop: A Tensor of type float16 or float32, with format NHWC or NCHW,
for the offset of "x".
*@li scale_backprop: A Tensor of type float32, with format NHWC or NCHW, for
the offset of "scale".
*@li offset_backprop: A Tensor of type float32, with format NHWC or NCHW, for
the offset of "offset".
*@li reserve_space_3: A Tensor of type float32, with format NHWC or NCHW.
*@li reserve_space_4: A Tensor of type float32, with format NHWC or NCHW . \n
@ -290,14 +331,18 @@ REG_OP(BatchNormGradExt2)
*@brief Performs batch normalization . \n
*@par Inputs:
*@li x: A 4D or 5D Tensor of type float16 or float32, with format NHWC or NCHW for 4D or NC1HWC0 for 5D.
*@li mean: A Tensor of type float32 or float16. Must be 1D if input "x" Specifies the mean used for inference.
*@li variance: A Tensor of type float32 or float16 . Must be 1D if input "x" Specifies the variance used for inference.
*@li x: A 4D or 5D Tensor of type float16 or float32, with format NHWC or NCHW
for 4D or NC1HWC0 for 5D.
*@li mean: A Tensor of type float32 or float16. Must be 1D if input "x"
Specifies the mean used for inference.
*@li variance: A Tensor of type float32 or float16 . Must be 1D if input "x"
Specifies the variance used for inference.
*@li momentum: A Tensor,represents the mean and the variance's scale factor
*@li scale: An optional tensor of type float16 or float32, no use
*@li offset: An optional tensor of type float16 or float32, no use
*@par Attributes:
*@li epsilon: An optional float32, specifying the small value added to variance to avoid dividing by zero. Defaults to "0.00001".
*@li epsilon: An optional float32, specifying the small value added to variance
to avoid dividing by zero. Defaults to "0.00001".
*@li use_global_stats: mean inference mode , only can be "True".
*@li mode: An optional input, not use
*@par Outputs:
@ -315,16 +360,20 @@ REG_OP(BNInference)
.ATTR(use_global_stats, Bool,true)
.ATTR(mode, Int,1)
.OP_END_FACTORY_REG(BNInference)
/**
*@brief aicpu batch normalization host . \n
*@par Inputs:
*@li mean: A Tensor of type float32 or float16. Must be 1D if input "x" Specifies the mean used for inference.
*@li variance: A Tensor of type float32 or float16 . Must be 1D if input "x" Specifies the variance used for inference.
*@li mean: A Tensor of type float32 or float16. Must be 1D if input "x"
Specifies the mean used for inference.
*@li variance: A Tensor of type float32 or float16 . Must be 1D if input "x"
Specifies the variance used for inference.
*@li momentum: An optional float, mean and variance's Scale factor
*@par Attributes:
*@li epsilon: An optional float32, specifying the small value added to variance to avoid dividing by zero. Defaults to "0.00001".
*@li epsilon: An optional float32, specifying the small value added to variance
to avoid dividing by zero. Defaults to "0.00001".
*@li use_global_stats: mean inference mode , only can be "True".
*@li mode: An optional attr, not use
*@par Outputs:
@ -348,14 +397,19 @@ REG_OP(BnHost)
*@brief Performs batch normalization . \n
*@par Inputs:
*@li x: A 4D or 5D Tensor of type float16 or float32, with format NHWC or NCHW for 4D or NC1HWC0 for 5D.
*@li mean: A Tensor of type float32 or float16. Must be 1D if input "x" Specifies the mean used for inference.
*@li variance: A Tensor of type float32 or float16 . Must be 1D if input "x" Specifies the variance used for inference.
*@li x: A 4D or 5D Tensor of type float16 or float32, with format NHWC or NCHW
for 4D or NC1HWC0 for 5D.
*@li mean: A Tensor of type float32 or float16. Must be 1D if input "x"
Specifies the mean used for inference.
*@li variance: A Tensor of type float32 or float16 . Must be 1D if input "x"
Specifies the variance used for inference.
*@li scale: An optional tensor of type float16 or float32, no use
*@li offset: An optional tensor of type float16 or float32, no use
*@par Attributes:
*@li momentum: An optional float32 num, represents the mean and the variance's scale factor
*@li epsilon: An optional float32, specifying the small value added to variance to avoid dividing by zero. Defaults to "0.00001".
*@li momentum: An optional float32 num, represents the mean and the variance's
scale factor
*@li epsilon: An optional float32, specifying the small value added to variance
to avoid dividing by zero. Defaults to "0.00001".
*@li use_global_stats: mean inference mode , only can be "True".
*@li mode: An optional attr, not use
*@par Outputs:

@ -310,9 +310,6 @@ REG_OP(DepthwiseConv2DBackpropInputD)
* @par Third-party framework compatibility
* @li Compatible with the TensorFlow operator DepthwiseConv2D.
* @li Compatible with the Caffe operator DepthwiseConv2D.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS EXPERIMENTAL. Please do not use.
*/
REG_OP(DepthwiseConv2D)
.INPUT(x, TensorType({DT_FLOAT16, DT_INT8}))

@ -158,18 +158,25 @@ REG_OP(Iou)
*@par Inputs:
* Three inputs, including:
*@li ydiff: A 5HD gradient input of type float32.
*@li rois: ROI position. A 2D Tensor of float32 with shape (N, 5). "N" indicates the number of ROIs,
the value "5" indicates the indexes of images where the ROIs are located, "x0", "x1", "y0", and "y1".
*@li rois_n: An optional input, specifying the number of valid ROIs. This parameter is reserved . \n
*@li rois: ROI position. A 2D Tensor of float32 with shape (N, 5). "N"
indicates the number of ROIs,
the value "5" indicates the indexes of images where the ROIs are located, "x0",
"x1", "y0", and "y1".
*@li rois_n: An optional input, specifying the number of valid ROIs. This
parameter is reserved . \n
*@par Attributes:
*@li xdiff_shape: A required list of 4 ints, obtained based on the shape of "features" of ROIAlign.
*@li pooled_width: A required attribute of type int, specifying the W dimension.
*@li pooled_height: A required attribute of type int, specifying the H dimension.
*@li spatial_scale: A required attribute of type float, specifying the scaling ratio of "features" to the original image.
*@li sample_num: An optional attribute of type int, specifying the horizontal and vertical
sampling frequency of each output. If this attribute is set to "0", the sampling frequency is
equal to the rounded up value of "rois", which is a floating point number. Defaults to "2" . \n
*@li spatial_scale: A required attribute of type float, specifying the scaling
ratio of "features" to the original image.
*@li sample_num: An optional attribute of type int, specifying the horizontal
and vertical
sampling frequency of each output. If this attribute is set to "0", the
sampling frequency is
equal to the rounded up value of "rois", which is a floating point number.
Defaults to "2" . \n
*@par Outputs:
*xdiff: Gradient added to input "features". Has the same 5HD shape as input "features".

@ -924,29 +924,7 @@ REG_OP(InstanceNormV2)
.ATTR(epsilon, Float, 0.00001)
.OP_END_FACTORY_REG(InstanceNormV2)
/**
*@brief Performs instance normalization for inference.
*@par Inputs:\n
* Five inputs, including: (NC1HWC0 supported)
*@li x: A Tensor of type float16 or float32.
*@li gamma: A [N, C1, 1, 1, C0] Tensor of type float32, for the scaling gamma.
*@li beta: A [N, C1, 1, 1, C0] Tensor of type float32, for the scaling beta.
*@li mean: A [N, C1, 1, 1, C0] ensor of type float32, for the mean.
*@li variance: A [N, C1, 1, 1, C0] Tensor of type float32, for the variance.
*@li variance_sqrt: A [N, C1, 1, 1, C0] Tensor of type float32, for the variance_sqrt.
*@par Outputs:\n
*y: A Tensor of type float16 or float32 for the normalized "x".
*batch_mean: A Tensor of type float32 for the result mean.
*batch_ variance: A Tensor of type float32 for the result variance.
*@attention Constraints:
*For Ascend 310, the result accuracy fails to reach 1<89> due to the square root instruction.
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use INInferV2 instead.
*/
REG_OP(INInferV2D)
.INPUT(x, TensorType({DT_FLOAT16, DT_FLOAT}))
.OPTIONAL_INPUT(gamma, TensorType({DT_FLOAT}))

@ -168,9 +168,6 @@ REG_OP(AvgPoolV2)
*@par Third-party framework compatibility
* Compatible with the TensorFlow operator AvgPool3D.
*
* @par Restrictions:
*Warning: THIS FUNCTION IS EXPERIMENTAL. Please do not use.
*/
REG_OP(AvgPool3D)
.INPUT(x, TensorType({DT_FLOAT16, DT_FLOAT32, DT_DOUBLE}))

@ -111,9 +111,6 @@ REG_OP(ApplyAdaMax)
*
*@par Third-party framework compatibility
*Compatible with the TensorFlow operator ApplyAdaMax.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ApplyAdaMax instead.
*/
REG_OP(ApplyAdaMaxD)
.INPUT(var, TensorType::NumberType())
@ -352,9 +349,6 @@ REG_OP(ApplyMomentum)
* accum: A mutable tensor. Has the same type as input "accum".
*@par Third-party framework compatibility
*Compatible with the TensorFlow operator ApplyMomentum.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ApplyMomentum instead.
*/
REG_OP(ApplyMomentumD)
@ -681,9 +675,6 @@ REG_OP(ApplyPowerSign)
*
*@par Third-party framework compatibility
*Compatible with the TensorFlow operator ApplyPowerSign.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ApplyPowerSign instead.
*/
REG_OP(ApplyPowerSignD)
.INPUT(var, TensorType::NumberType())
@ -804,9 +795,6 @@ REG_OP(ApplyAddSign)
*@par Third-party framework compatibility
* Compatible with the TensorFlow operator ApplyAddSign.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ApplyAddSign instead.
*/
REG_OP(ApplyAddSignD)
.INPUT(var, TensorType::NumberType())
@ -928,9 +916,6 @@ REG_OP(ApplyCenteredRMSProp)
*@par Third-party framework compatibility
*Compatible with the TensorFlow operator ApplyCenteredRMSPropD.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ApplyCenteredRMSProp instead.
*/
REG_OP(ApplyCenteredRMSPropD)
.INPUT(var, TensorType::NumberType())
@ -1049,9 +1034,6 @@ REG_OP(ApplyAdagrad)
*
*@par Third-party framework compatibility
*Compatible with the TensorFlow operator ApplyAdagrad.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ApplyAdagrad instead.
*/
REG_OP(ApplyAdagradD)
.INPUT(var, TensorType::NumberType())
@ -1236,9 +1218,6 @@ REG_OP(ApplyAdagradDA)
*@par Third-party framework compatibility
*Compatible with the TensorFlow operator ApplyAdagradDA.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ApplyAdagradDA instead.
*/
REG_OP(ApplyAdagradDAD)
.INPUT(var, TensorType::NumberType())
@ -1496,9 +1475,6 @@ REG_OP(ApplyProximalAdagrad)
*@par Third-party framework compatibility
*Compatible with the TensorFlow operator ApplyProximalAdagradD.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ApplyProximalAdagrad instead.
*/
REG_OP(ApplyProximalAdagradD)
.INPUT(var, TensorType::NumberType())
@ -1592,9 +1568,6 @@ REG_OP(SparseApplyProximalAdagrad)
*@par Third-party framework compatibility
*Compatible with the TensorFlow operator SparseApplyProximalAdagrad.
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use SparseApplyProximalAdagrad instead.
*/
REG_OP(SparseApplyProximalAdagradD)
.INPUT(var, TensorType::NumberType())
@ -1681,9 +1654,6 @@ REG_OP(ApplyFtrl)
*@par Third-party framework compatibility
*Compatible with the TensorFlow operator ApplyFtrl.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ApplyFtrl instead.
*/
REG_OP(ApplyFtrlD)
.INPUT(var, TensorType::NumberType())
@ -1775,9 +1745,6 @@ REG_OP(ApplyFtrlV2)
*@par Third-party framework compatibility
*Compatible with the TensorFlow operator ApplyFtrlV2.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ApplyFtrlV2 instead.
*/
REG_OP(ApplyFtrlV2D)
.INPUT(var, TensorType::NumberType())
@ -1890,9 +1857,6 @@ REG_OP(ApplyAdam)
*@par Third-party framework compatibility
*Compatible with the TensorFlow operator ApplyAdam.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ApplyAdam instead.
*/
REG_OP(ApplyAdamD)
.INPUT(var, TensorType::NumberType())
@ -1981,9 +1945,6 @@ REG_OP(ApplyAdadelta)
*@par Third-party framework compatibility
* Compatible with the TensorFlow operator ApplyAdadelta.
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ApplyAdadelta instead.
*/
REG_OP(ApplyAdadeltaD)
.INPUT(var, TensorType::NumberType())

@ -65,9 +65,6 @@ REG_OP(Fill)
*
*@par Outputs:
* y: A tensor. Has the same type as "value".
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use Fill instead.
*/
REG_OP(FillD)
.INPUT(value, TensorType({DT_FLOAT, DT_FLOAT16, DT_INT8, DT_INT16,
@ -125,9 +122,6 @@ REG_OP(BroadcastTo)
*
*@par Third-party framework compatibility
*Compatible with the TensorFlow operator BroadcastTo.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use BroadcastTo instead.
*/
REG_OP(BroadcastToD)
.INPUT(x, TensorType::BasicType())
@ -175,9 +169,6 @@ REG_OP(Pad)
*@par Third-party framework compatibility:
* Compatible with TensorFlow operator Pad.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use Pad instead.
*/
REG_OP(PadD)
.INPUT(x, TensorType({DT_FLOAT16, DT_FLOAT, DT_INT8, DT_UINT8, DT_FLOAT}))
@ -272,9 +263,6 @@ REG_OP(PadV3D)
*@see Diag()
*@par Third-party framework compatibility
* Compatible with the TensorFlow operator Diag.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use Diag instead.
*/
REG_OP(DiagD)
.INPUT(x, TensorType({DT_FLOAT16, DT_FLOAT, DT_INT32}))

@ -30,7 +30,7 @@ namespace ge {
*@par Inputs:
*Two inputs, including:
*@li rt_nested_splits: A list of at least 1 Tensor objects with the same type
in: int32, int64. The row_splits for the RaggedTensor. It's a dynamic input.
in: int32, int64. The row_splits for the RaggedTensor.
*@li rt_dense_values: A Tensor. The flat_values for the RaggedTensor
Must be one of the following types: bool, int8, int16, uint16, int32,
int64, double, float, float16 . \n
@ -66,7 +66,7 @@ REG_OP(RaggedTensorToSparse)
*@li values:A 1D tensor representing the values of the ragged tensor.
*@li default_value:A `Tensor`. Must have the same type as `values`.
*@li row_partition_tensors:A list of at least 1 `Tensor` objects with the same
type in: `int64`, `int32` . It's a dynamic input.\n
type in: `int64`, `int32` .\n
*@par Attributes:
*@li num_row_partition_tensors:Numbers of row partition tensors.

@ -374,9 +374,6 @@ REG_OP(DropOutGenMask)
*@par Third-party framework compatibility
* Compatible with the TensorFlow operator lin_space.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use LinSpace instead.
*/
REG_OP(LinSpaceD)
.INPUT(assist, TensorType({DT_FLOAT}))

@ -353,9 +353,6 @@ REG_OP(ReduceSum)
*@par Third-party framework compatibility
* Compatible with the TensorFlow operator Sum.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ReduceSum instead.
*/
REG_OP(ReduceSumD)
.INPUT(x, TensorType({DT_FLOAT16, DT_FLOAT}))
@ -381,9 +378,6 @@ REG_OP(ReduceSumD)
*@par Third-party framework compatibility
* Compatible with the TensorFlow operator ReduceAll.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ReduceAll instead.
*/
REG_OP(ReduceAllD)
.INPUT(x, TensorType({DT_BOOL}))
@ -459,9 +453,6 @@ REG_OP(ReduceProd)
*@par Third-party framework compatibility
* Compatible with the TensorFlow operator ReduceProd.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ReduceProd instead.
*/
REG_OP(ReduceProdD)
.INPUT(x,TensorType({DT_FLOAT, DT_UINT8, DT_INT8, DT_INT32, DT_FLOAT16}))
@ -516,9 +507,6 @@ REG_OP(ReduceMean)
*@par Third-party framework compatibility:
* Compatible with the TensorFlow operator ReduceMean.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ReduceMean instead.
*/
REG_OP(ReduceMeanD)
.INPUT(x, TensorType({DT_FLOAT16, DT_FLOAT}))
@ -573,9 +561,6 @@ REG_OP(ReduceMax)
*@par Third-party framework compatibility
* Compatible with TensorFlow operator Max.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ReduceMax instead.
*/
REG_OP(ReduceMaxD)
.INPUT(x, TensorType({DT_FLOAT, DT_UINT8, DT_INT8,
@ -630,9 +615,6 @@ REG_OP(ReduceMin)
*@par Third-party framework compatibility
* Compatible with the TensorFlow operator reduce_min.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ReduceMin instead.
*/
REG_OP(ReduceMinD)
.INPUT(x, TensorType({DT_FLOAT16,DT_FLOAT,DT_INT8,DT_UINT8}))
@ -699,9 +681,6 @@ REG_OP(ReduceAny)
*
*@par Third-party framework compatibility
*Compatible with the TensorFlow operator reduce_any.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use ReduceAny instead.
*/
REG_OP(ReduceAnyD)
.INPUT(x, TensorType({DT_BOOL}))
@ -787,9 +766,6 @@ REG_OP(EuclideanNorm)
*@par Third-party framework compatibility
* Compatible with the TensorFlow operator EuclideanNorm.
*
* @par Restrictions:
* Warning: THIS FUNCTION IS DEPRECATED. Please use EuclideanNorm instead.
*/
REG_OP(EuclideanNormD)
.INPUT(x, TensorType({DT_FLOAT, DT_INT32, DT_FLOAT16}))

@ -92,6 +92,7 @@ REG_OP(DynamicLSTM)
.OUTPUT(output_h, TensorType({DT_FLOAT32}))
.OP_END_FACTORY_REG(DynamicLSTM)
/**
*@brief: DynamicRNNGrad calculation.
*@par Inputs:
@ -126,7 +127,7 @@ REG_OP(DynamicLSTM)
*@li keep_prob:An float identifying the keep prob in the op. Default to 1.
*@li cell_clip:An float identifying the cell clip in the op. Default to -1.
*@li num_proj:An integer identifying the num projection in the op. Default to 0.
*@li time_major:An bool identifying the time major in the op. Default to false.
*@li time_major:An bool identifying the time major in the op. Default to true.
*@li activation:An string identifying the type of activation function in the op. Default to "tanh". Only tanh is currently supported.
*@li forget_bias:An float identifying the forget bias in the op. Default to 0.
*@li is_training:An bool identifying is training in the op. Default to true.

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

Loading…
Cancel
Save