FilesLast commitLast update
21 days ago
2 months ago
3 months ago
1 month ago
2 months ago
2 days ago
2 months ago
2 months ago
1 day ago
1 month ago
13 days ago
README

ReduceAny

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

For each dimension in the given dimension dim, if any element corresponding to that dimension in the input tensor computes 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]. Then the shape of the output tensor is (B×D)(B \times D), and the output tensor has two fewer dimensions than the input.

Parameter Description

Parameter Name Input/Output Description Data Type Data Format
self Input Input tensor. BOOL, INT8, UINT8, INT16, INT32, INT64, BFLOAT16, FLOAT16, FLOAT32, DOUBLE ND
dim Input Dimensions to squeeze. INT64 -
keepDim Input Specifies whether the dimensions of the reduce axis are retained. BOOL -
out Output Output tensor. BOOL 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
aclnn API test_aclnn_any.cpp Invokes the ReduceAny operator through the aclnnAny API.