FilesLast commitLast update
20 days ago
2 months ago
3 months ago
1 month ago
14 days ago
28 days ago
3 months ago
2 months ago
14 days ago
28 days ago
1 month ago
12 days ago
README

Square

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

  • Computation formula:

    y=x∗x=x2y = x * x = x^2

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
x Input The input tensor x in the formula. BFLOAT16, FLOAT16, FLOAT, INT32, INT64 ND
y Output The output tensor y in the formula. BFLOAT16, FLOAT16, FLOAT, INT32, INT64 ND
  • Atlas training products and Atlas inference products: BFLOAT16 is not supported.

Invocation Description

Invocation Method Invocation Sample Description
aclnn invocation test_aclnn_square Invokes the Square operator through the aclnnSquare API.
Graph-mode invocation test_geir_square Invokes the Square operator by building a graph through the operator IR.