FilesLast commitLast update
17 days ago
9 months ago
2 months ago
1 month ago
2 months ago
30 days ago
2 months ago
2 months ago
30 days ago
1 month ago
9 days ago
README

ReduceProd

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

Operator function: returns the product of all elements in the input tensor.

Parameter Description

  • self (aclTensor*, computation input): an aclTensor on the Device side. Non-contiguous Tensor is supported, and the data format supports ND.

    • Atlas inference products and Atlas training products: the data types supported are FLOAT16, FLOAT, DOUBLE, INT8, UINT8, INT16, INT32, INT64, BOOL, COMPLEX64, and COMPLEX128. When the input is an empty tensor, the output type cannot be the complex types COMPLEX64 or COMPLEX128.
    • Atlas A2 products, Atlas A3 products, and Ascend 950PR&950DT products: the data types supported are FLOAT16, FLOAT, DOUBLE, INT8, UINT8, INT16, INT32, INT64, BOOL, COMPLEX64, COMPLEX128, and BFLOAT16. When the input is an empty tensor, the output type cannot be the complex types COMPLEX64 or COMPLEX128.
  • dtype (const aclDataType, computation input): an aclDataType on the Host side, the data type of the output tensor, which must be the same as the data type of out.

  • out (aclTensor*, computation output): an aclTensor on the Device side. The data type is the same as dtype, and if dtype is not passed in, the data type is the same as self. Non-contiguous Tensor is supported, and the data format supports ND. The output shape is (1).

    • Atlas inference products and Atlas training products: the data types supported are FLOAT16, FLOAT, DOUBLE, INT8, UINT8, INT16, INT32, INT64, BOOL, COMPLEX64, and COMPLEX128.
    • Atlas A2 products, Atlas A3 products, and Ascend 950PR&950DT products: the data types supported are FLOAT16, FLOAT, DOUBLE, INT8, UINT8, INT16, INT32, INT64, BOOL, COMPLEX64, COMPLEX128, and BFLOAT16.

Constraint Description

  • Deterministic computation:
    • Deterministic implementation by default.

Invocation Example

Invocation Method Sample Code Description
aclnn API test_aclnn_prod Invokes the ReduceProd operator through the aclnnProd API.
aclnn API test_aclnn_prod_dim Invokes the ReduceProd operator through the aclnnProdDim API.