FilesLast commitLast update
6 days ago
2 months ago
3 months ago
1 month ago
25 days ago
5 days ago
7 days ago
4 days ago
5 days ago
1 month ago
11 days ago
README

Abs

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: computes the absolute value of each element in the input tensor.

  • Computation formula:

out=∣self∣out=|self|

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
self Input Input parameter for the abs computation, which is self in the formula. FLOAT, FLOAT16, DOUBLE, BFLOAT16, INT8, INT16, INT32, INT64, UINT8, BOOL, COMPLEX32, COMPLEX64 ND
out Output Output parameter for the abs computation, which is out in the formula. FLOAT, FLOAT16, DOUBLE, BFLOAT16, INT8, INT16, INT32, INT64, UINT8, BOOL, COMPLEX32, COMPLEX64 ND
  • Atlas training products and Atlas inference products: BFLOAT16, COMPLEX32, and COMPLEX64 are not supported.
  • The UINT8 and BOOL types are supported only through the aclnn invocation.

Constraint Description

None

Invocation Description

Invocation Method Invocation Sample Description
aclnn invocation test_aclnn_abs Invokes the Abs operator through the aclnnAbs API.
Graph-mode invocation test_geir_abs Invokes the Abs operator by building a graph through the operator IR.