FilesLast commitLast update
22 days ago
5 months ago
3 months ago
3 days ago
2 months ago
3 days ago
2 months ago
1 month ago
3 months ago
3 days ago
1 month ago
14 days ago
README

ReduceAll

English | 简体中文

Product Support Status

Product Supported
Ascend 950PR&950DT products √
Atlas A3 products √
Atlas A2 products √
Atlas 200I/500 A2 inference products √
Atlas inference products √
Atlas training products √

Function Description

  • API function: for each dimension in the given dimension dim, if all elements corresponding to that dimension in the input tensor compute to True, True is returned; otherwise, False is returned. If keepdim is True, the dimensions of the output tensor are the same as those of the input. Otherwise, the dim dimensions are squeezed, reducing the output tensor by len(dim) dimensions.
  • For example, the shape of the input tensor is (A×B×C×D)(A\times B \times C \times D), and the value of dim is [0, 2]. If keepdim is False, the shape of the output tensor is (B×D)(B \times D), and the output tensor has two fewer dimensions than the input. If keepdim is True, the shape of the output tensor is (1×B×1×D)(1 \times B \times 1 \times D), and the dimensions of the output tensor are the same as those of the input.

Parameter Description

Parameter Name Input/Output Description Data Type Data Format
self Input Input tensor. BOOL, UINT8, INT8, INT16, INT32, INT64, FLOAT, FLOAT16, BFLOAT16, DOUBLE ND
dim Input Dimensions to reduce. INT -
keepdim Input Specifies whether the dimensions of the reduce axis are retained. BOOL -
out Output Output tensor. BOOL, UINT8 ND
workspaceSize Output Returns the size of the workspace that needs to be allocated on the Device side. - -
executor Output Returns the op executor, which contains the operator computation process. - -
  • Atlas inference products, Atlas training products, and Atlas 200I/500 A2 inference products: the data type BFLOAT16 is not supported.

Constraint Description

None

Invocation Description

Invocation Method Sample Code Description
Graph-mode invocation test_geir_reduce_all.cpp Invokes the ReduceAll operator in GE IR graph mode.
aclnn invocation test_aclnn_all.cpp Invokes the ReduceAll operator through the aclnnAll API.