FilesLast commitLast update
16 days ago
13 days ago
17 days ago
20 days ago
17 days ago
9 days ago
21 days ago
28 days ago
1 month ago
8 days ago
README

Signbit

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: checks whether the sign bit of each element in the input tensor is 1, that is, whether the element is a negative number or -0.0.

  • Computation formula:

    yi=(xi<0) ? True:False(returnsTruewhenxiis−0.0)y_i = (x_i < 0) \: ? \: True : False \quad (returns True when x_i is -0.0)

  • Example:

    • If x=[0, -3, 5], the result of signbit(x) is [False, True, False].
    • If x=[[-0.0, 3.14], [-2.718, inf]], the result of signbit(x) is [[True, False], [True, False]].

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
x Input Input parameter for the sign bit check, which is x_i in the formula. FLOAT, FLOAT16, BFLOAT16, DOUBLE, INT8, UINT8, INT32, INT64, UINT64, BOOL ND
y Output Output parameter of the sign bit check, which is y_i in the formula. BOOL ND
  • Atlas training products: BFLOAT16 is not supported.

Constraint Description

None

Invocation Description

Invocation Method Invocation Sample Description
aclnn invocation test_aclnn_signbit Invokes the Signbit operator through the aclnnSignbit API.