FilesLast commitLast update
22 days ago
2 months ago
1 month ago
16 days ago
8 days ago
3 months ago
16 days ago
8 days ago
1 month ago
14 days ago
README

Trunc

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: rounds each element of the input tensor and discards the decimal part.
  • Computation formula:

outi=trunc(inputi)out_i = \text{trunc}(input_i)

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
x Input Input parameter for the trunc computation, which is input_i in the formula. FLOAT, FLOAT16, BFLOAT16, INT8, INT32, UINT8 ND
y Output Output tensor after the trunc computation, which is out_i in the formula. FLOAT, FLOAT16, BFLOAT16, INT8, INT32, UINT8 ND

Constraint Description

None

Invocation Description

Invocation Method Invocation Sample Description
aclnn invocation test_aclnn_trunc Invokes the Trunc operator through the aclnnTrunc or aclnnInplaceTrunc API.