triton.language.extra.cann.libdevice#
Libdevice Ops#
Computes the absolute value of the input parameter. |
|
Computes the inverse cosine (arccos) of the input parameter. |
|
Computes the inverse hyperbolic cosine of the input parameter. |
|
Floating-point addition with round-down (toward negative infinity) rounding mode. |
|
Floating-point addition with round-to-nearest-even rounding mode. |
|
Floating-point addition with round-up (toward positive infinity) rounding mode. |
|
Floating-point addition with round-toward-zero rounding mode. |
|
Computes the inverse sine (arcsin) of the input parameter. |
|
Computes the inverse hyperbolic sine of the input parameter. |
|
Computes the inverse tangent (arctan) of the input parameter. |
|
Two-argument inverse tangent function, computes the arctangent of x / y. |
|
Inverse hyperbolic tangent function, computes the inverse hyperbolic tangent of the input parameter. |
|
Bit reversal function, reverses the bit order of a 32-bit integer. |
|
Selects bytes from two 32-bit integers x and y according to selector s and combines them into a new integer. |
|
Computes the cube root of the input parameter. |
|
Ceiling operation, returns the smallest integer greater than or equal to x. |
|
Counts the number of leading zeros in a 32-bit integer. |
|
Generates a floating-point number with magnitude equal to the magnitude of x and sign equal to the sign of y. |
|
Computes the cosine of the input parameter (in radians). |
|
Computes the hyperbolic cosine of the input parameter. |
|
Computes the value of cos(π × x). |
|
Computes the modified Bessel function of the first kind, order 0, of the input parameter. |
|
Computes the modified Bessel function of the first kind, order 1, of the input parameter. |
|
Floating-point division with round-down (toward negative infinity) rounding mode. |
|
Floating-point division with round-to-nearest-even rounding mode. |
|
Floating-point division with round-up (toward positive infinity) rounding mode. |
|
Floating-point division with round-toward-zero rounding mode. |
|
Computes the error function of the input parameter. |
|
Computes the complementary error function of the input parameter, i.e., 1 - erf(x). |
|
Inverse complementary error function, finds the value y such that x = erfc(y). |
|
Computes the scaled complementary error function of the input parameter, i.e., exp(x²) × erfc(x). |
|
Inverse error function, finds the value y such that x = erf(y). |
|
Exponential function, computes e raised to the power of x. |
|
Base-10 exponential function, computes 10 raised to the power of x. |
|
Base-2 exponential function, computes 2 raised to the power of x. |
|
Computes e raised to the power of x, minus 1. |
|
Fast approximate cosine function. |
|
Fast approximate division. |
|
Fast approximate base-10 exponential function. |
|
Fast approximate exponential function. |
|
Fast approximate base-10 logarithm function. |
|
Fast approximate base-2 logarithm function. |
|
Fast approximate natural logarithm function. |
|
Fast approximate power function. |
|
Fast approximate sine function. |
|
Fast approximate tangent function. |
|
Computes the hyperbolic tangent of x using a fast approximation. |
|
Computes the positive difference between x and y. |
|
Finds the first bit set to 1 and returns the index of the lowest bit set to 1. |
|
Determines whether the input is a finite floating-point number. |
|
Converts x from a 32-bit floating-point value to a 16-bit floating-point value using round-to-nearest-even. |
|
Converts a floating-point number to a 32-bit integer with round-down mode. |
|
Converts a floating-point number to a 32-bit integer with round-to-nearest-even mode. |
|
Converts a floating-point number to a 32-bit integer with round-up mode. |
|
Converts a floating-point number to a 32-bit integer with round-toward-zero mode. |
|
Converts a floating-point number to a 64-bit integer with round-down mode. |
|
Converts a floating-point number to a 64-bit integer with round-to-nearest-even mode. |
|
Converts a floating-point number to a 64-bit integer with round-up mode. |
|
Converts a floating-point number to a 64-bit integer with round-toward-zero mode. |
|
Converts a floating-point number to a 32-bit unsigned integer with round-down mode. |
|
Converts a floating-point number to a 32-bit unsigned integer with round-to-nearest-even mode. |
|
Converts a floating-point number to a 32-bit unsigned integer with round-up mode. |
|
Converts a floating-point number to a 32-bit unsigned integer with round-toward-zero mode. |
|
Converts a floating-point number to a 64-bit unsigned integer with round-down mode. |
|
Converts a floating-point number to a 64-bit unsigned integer with round-to-nearest-even mode. |
|
Converts a floating-point number to a 64-bit unsigned integer with round-up mode. |
|
Converts a floating-point number to a 64-bit unsigned integer with round-toward-zero mode. |
|
Reinterprets the bit pattern of a floating-point number as a 32-bit integer. |
|
Reinterprets the bit pattern of a floating-point number as a 32-bit unsigned integer. |
|
Floor operation, returns the largest integer less than or equal to x. |
|
Fused multiply-add, computes x × y + z. |
|
Fused multiply-add operation with round-down rounding mode. |
|
Fused multiply-add operation with round-to-nearest-even rounding mode. |
|
Fused multiply-add operation with round-up rounding mode. |
|
Fused multiply-add operation with round-toward-zero rounding mode. |
|
Floating-point modulo, computes the remainder of x / y, with the same sign as x. |
|
Computes the gamma function of the input parameter. |
|
Computes the average of x and y. |
|
Converts x from a 16-bit floating-point value to a 32-bit floating-point value. |
|
Computes the Euclidean distance between x and y. |
|
Extracts the unbiased exponent (base-2 integer logarithm) of a floating-point number. |
|
Converts a 32-bit integer to a floating-point number with round-down mode. |
|
Converts a 32-bit integer to a floating-point number with round-to-nearest-even mode. |
|
Converts a 32-bit integer to a floating-point number with round-up mode. |
|
Converts a 32-bit integer to a floating-point number with round-toward-zero mode. |
|
Reinterprets the bit pattern of a 32-bit integer as a floating-point number. |
|
Determines whether the input is infinity. |
|
Determines whether the input is NaN (not a number). |
|
Computes the Bessel function of the first kind of order 0 of the input parameter. |
|
Computes the Bessel function of the first kind of order 1 of the input parameter. |
|
Computes the Bessel function of the first kind of order n of the input parameter. |
|
Computes the value of x × 2^exp. |
|
Computes the natural logarithm of the absolute value of the gamma function for input x. |
|
Converts a 64-bit integer to a floating-point number with round-down mode. |
|
Converts a 64-bit integer to a floating-point number with round-to-nearest-even mode. |
|
Converts a 64-bit integer to a floating-point number with round-up mode. |
|
Converts a 64-bit integer to a floating-point number with round-toward-zero mode. |
|
Rounds a floating-point number to the nearest 64-bit integer value. |
|
Rounds a floating-point number to the nearest 64-bit integer value. |
|
Computes the natural (base-e) logarithm of input x. |
|
Computes the base-10 logarithm of input x. |
|
Computes the value of log(1 + x). |
|
Computes the base-2 logarithm of input x. |
|
Extracts the exponent value of a floating-point number. |
|
Computes the element-wise maximum of x and y. |
|
Computes the element-wise minimum of x and y. |
|
Computes the lower 24-bit multiplication result of x and y. |
|
Floating-point multiplication with round-down rounding mode. |
|
Floating-point multiplication with round-to-nearest-even rounding mode. |
|
Floating-point multiplication with round-up rounding mode. |
|
Floating-point multiplication with round-toward-zero rounding mode. |
|
Computes the high 32 bits of the multiplication result of x and y. |
|
Generates a NaN value from x. |
|
Converts x to the nearest integer. |
|
Computes the next representable floating-point number from x toward y. |
|
Computes the Euclidean norm of a 3D vector, i.e., sqrt(x² + y² + z²). |
|
Computes the Euclidean norm of a 4D vector, i.e., sqrt(x² + y² + z² + w²). |
|
Computes the cumulative distribution function of the standard normal distribution. |
|
Computes the inverse of the cumulative distribution function of the standard normal distribution. |
|
Counts the number of bits set to 1 in x. |
|
Power function, computes x raised to the power of y. |
|
Computes the reciprocal cube root of x. |
|
Floating-point reciprocal with round-down rounding mode. |
|
Floating-point reciprocal with round-to-nearest-even rounding mode. |
|
Floating-point reciprocal with round-up rounding mode. |
|
Floating-point reciprocal with round-toward-zero rounding mode. |
|
Computes the reciprocal of x (i.e., 1 / x). |
|
Rectified linear unit function, returns x when x > 0, otherwise returns 0. |
|
Computes the remainder of x divided by y, where r = x - ny, and n is the nearest integer to x / y. |
|
Computes the rounded average of x and y. |
|
Computes the reciprocal of the Euclidean distance between x and y. |
|
Computes the nearest integer to x using round-to-nearest-even rounding mode. |
|
Computes the reciprocal of the Euclidean norm of a 3D vector. |
|
Computes the reciprocal of the Euclidean norm of a 4D vector. |
|
Computes the nearest integer to x using round-to-nearest-even rounding mode. |
|
Computes the reciprocal square root of x. |
|
Computes the reciprocal square root of x using round-to-nearest-even rounding mode. |
|
Computes abs(x - y) + z for signed or unsigned 32-bit integers. |
|
Clamps x to the range [+0.0, 1.0]. |
|
Computes the value of x × 2^n. |
|
Extracts the sign bit of x. |
|
Computes the sine of the input parameter x (in radians). |
|
Computes the hyperbolic sine of input parameter x. |
|
Computes the value of sin(π × x). |
|
Computes the square root of x. |
|
Computes the square root of x with round-down rounding mode. |
|
Computes the square root of x with round-to-nearest-even rounding mode. |
|
Computes the square root of x with round-up rounding mode. |
|
Computes the square root of x with round-toward-zero rounding mode. |
|
Floating-point subtraction with round-down rounding mode. |
|
Floating-point subtraction with round-to-nearest-even rounding mode. |
|
Floating-point subtraction with round-up rounding mode. |
|
Floating-point subtraction with round-toward-zero rounding mode. |
|
Computes the tangent of input parameter x (in radians). |
|
Computes the hyperbolic tangent of input parameter x. |
|
Computes the gamma function of the input parameter. |
|
Truncation operation, rounds toward zero to the nearest integer. |
|
Converts a 32-bit unsigned integer to a floating-point number with round-down mode. |
|
Converts a 32-bit unsigned integer to a floating-point number with round-to-nearest-even mode. |
|
Converts a 32-bit unsigned integer to a floating-point number with round-up mode. |
|
Converts a 32-bit unsigned integer to a floating-point number with round-toward-zero mode. |
|
Reinterprets the bit pattern of a 32-bit unsigned integer as a floating-point number. |
|
Converts a 64-bit unsigned integer to a floating-point number with round-down mode. |
|
Converts a 64-bit unsigned integer to a floating-point number with round-to-nearest-even mode. |
|
Converts a 64-bit unsigned integer to a floating-point number with round-up mode. |
|
Converts a 64-bit unsigned integer to a floating-point number with round-toward-zero mode. |
|
Computes the Bessel function of the second kind of order 0 of the input parameter. |
|
Computes the Bessel function of the second kind of order 1 of the input parameter. |
|
Computes the Bessel function of the second kind of order n of the input parameter. |