FilesLast commitLast update
21 days ago
21 days ago
3 months ago
21 days ago
21 days ago
10 days ago
21 days ago
21 days ago
16 days ago
10 days ago
14 days ago
14 days ago
README

Acosh

English | 简体中文

Inverse hyperbolic cosine operator, which corresponds to PyTorch torch.acosh / torch.acosh_. Online aclnn API documentation: docs/aclnnAcosh&aclnnInplaceAcosh_en.md

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

  • API function: computes the inverse hyperbolic cosine of each element in the input Tensor and outputs the result.

  • Computation formula:

    out=cosh−1(self)out=cosh^{-1}(self)

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
x Input The input x in the formula, whose dtype is the same as that of y and whose shape is arbitrary (0 to 8 dimensions). Empty tensors are supported. A non-contiguous tensor input is automatically converted to a contiguous tensor by the framework before execution. FLOAT, FLOAT16, BFLOAT16 ND
y Output The output y in the formula, whose shape is exactly the same as that of x. A non-contiguous tensor output is automatically converted to a contiguous tensor by the framework before execution. FLOAT, FLOAT16, BFLOAT16 ND
selfRef Input/Output A parameter specific to the aclnn in-place API (corresponding to the input x and output y in the operator definition). It is a tensor that serves as both input and output, and the computation result is written back in place. A non-contiguous tensor is automatically converted to a contiguous tensor by the framework before execution. FLOAT, FLOAT16, BFLOAT16 ND

Constraint Description

  • The value range of the real input is [1, +∞). When x is less than 1, NaN is output.
  • The number of shape dimensions ∈ [0, 8], and the shape of y is exactly the same as that of x.

Invocation Description

Invocation Method Invocation Sample Description
aclnn invocation (non-in-place) examples/test_aclnn_acosh.cpp Refer to build.sh in the root directory of the ops-math repository to complete operator compilation and operator package installation, and then use the examples for verification (on a real NPU).
aclnn invocation (in-place) examples/test_aclnn_inplace_acosh.cpp