FilesLast commitLast update
18 days ago
2 months ago
3 months ago
8 days ago
24 days ago
12 days ago
1 month ago
1 month ago
8 days ago
12 days ago
1 month ago
13 days ago
README

Sub

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: performs the subtraction computation, and the minuend is scaled by alpha.

  • Computation formula:

    outi=selfi−alpha×otheriout_{i} = self_{i} - alpha \times other_{i}

    selfRefi=selfRefi−alpha×otheriselfRef_{i}=selfRef_{i}-alpha \times other_{i}

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
self Input Input parameter for the sub computation, which is self_i in the formula. FLOAT, FLOAT16, DOUBLE, INT32, INT64, INT16, INT8, UINT8, BOOL, COMPLEX128, COMPLEX64, BFLOAT16 ND
other Input Input parameter for the sub computation, which is other_i in the formula. FLOAT, FLOAT16, DOUBLE, INT32, INT64, INT16, INT8, UINT8, BOOL, COMPLEX128, COMPLEX64, BFLOAT16 ND
alpha Input Input parameter for the sub computation, which is alpha in the formula. FLOAT, FLOAT16, DOUBLE, INT32, INT64, INT16, INT8, UINT8, BOOL, COMPLEX128, COMPLEX64, BFLOAT16 ND
out Output Output parameter for the sub computation, which is out_i in the formula. FLOAT, FLOAT16, DOUBLE, INT32, INT64, INT16, INT8, UINT8, BOOL, COMPLEX128, COMPLEX64, BFLOAT16 ND
  • Atlas training products and Atlas inference products: BFLOAT16 is not supported.

Constraint Description

None

Invocation Description

Invocation Method Invocation Sample Description
aclnn invocation test_aclnn_sub Invokes the Sub operator through the aclnnSub API.
Graph-mode invocation test_geir_sub Invokes the Sub operator by building a graph through the operator IR.