CHLO Dialect
Refer to the official documentation for more details.
Reactant.MLIR.Dialects.chlo._asin_acos_kernel Method
_asin_acos_kernel
Returns AsinAcosKernel(operand)
element-wise.
If w = _asin_acos_kernel(z) w' = _asin_acos_kernel(I * z) then asin(z) = complex(atan2(z.real, w.real), sign(z.imag) * w.imag) acos(z) = complex(atan2(w.real, z.real), -sign(z.imag) * w.imag) asinh(z) = complex(sign(z.real) * w'.imag, atan2(z.imag, w'.real)) acosh(z) = complex(w.imag, sign(z.imag) * atan2(w.real, z.real))
This op is used as an intermediate value in decompositions and should never be constructed directly by frameworks or consumed by backends.
sourceReactant.MLIR.Dialects.chlo.acos Method
acos
Returns Acos(operand)
element-wise.
$
\acos(x) = 2 * \atan(\sqrt(1 - x^2) / (1 + x)) if x != -1 = pi if x == -1 $
sourceReactant.MLIR.Dialects.chlo.acosh Method
acosh
Returns Acosh(operand)
element-wise.
$
\acosh(x) = log(x + sqrt(x^2 - 1)) if x >= -1 \acosh(x) = nan if x < -1 $
sourceReactant.MLIR.Dialects.chlo.asin Method
asin
Returns Asin(operand)
element-wise.
$
\asin(x) = 2 * atan(x / (1 + sqrt(1 - x^2))) $
sourceReactant.MLIR.Dialects.chlo.asinh Method
asinh
Returns Asinh(operand)
element-wise.
$
\asinh(x) = log(x + sqrt(x^2 + 1)) $
sourceReactant.MLIR.Dialects.chlo.atan Method
atan
Returns Atan(operand)
element-wise.
$
\atan(x) = \atan2(x, 1) $
sourceReactant.MLIR.Dialects.chlo.atanh Method
atanh
Returns Atanh(operand)
element-wise.
$
\atanh(x) = 0.5 * log((1 + x) / (1 - x)) if abs(x) <= 1 = nan otherwise $
sourceReactant.MLIR.Dialects.chlo.bessel_i1e Method
bessel_i1e
Returns bessel_i1e(operand)
element-wise.
Reactant.MLIR.Dialects.chlo.broadcast_add Method
broadcast_add
Returns lhs + rhs
element-wise.
See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.
sourceReactant.MLIR.Dialects.chlo.broadcast_and Method
broadcast_and
Returns logical_and(lhs, rhs)
element-wise.
See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.
sourceReactant.MLIR.Dialects.chlo.broadcast_atan2 Method
broadcast_atan2
Returns atan2(lhs/rhs)
element-wise.
See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.
sourceReactant.MLIR.Dialects.chlo.broadcast_compare Method
broadcast_compare
Compares lhs
and rhs
elementwise according to comparison_direction
and compare_type
. If unspecified, compare_type
is FLOAT for float element types, SIGNED for signed element types and UNSIGNED for unsigned element types.
See https://www.tensorflow.org/xla/operation_semantics#element-wise_comparison_operations.
sourceReactant.MLIR.Dialects.chlo.broadcast_complex Method
broadcast_complex
Performs element-wise conversion of a pair of real and imaginary values to a complex value.
sourceReactant.MLIR.Dialects.chlo.broadcast_divide Method
broadcast_divide
Returns lhs / rhs
element-wise.
See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.
sourceReactant.MLIR.Dialects.chlo.broadcast_maximum Method
broadcast_maximum
Returns max(lhs, rhs)
element-wise.
See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.
sourceReactant.MLIR.Dialects.chlo.broadcast_minimum Method
broadcast_minimum
Returns min(lhs, rhs)
element-wise.
See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.
sourceReactant.MLIR.Dialects.chlo.broadcast_multiply Method
broadcast_multiply
Returns lhs * rhs
element-wise.
See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.
sourceReactant.MLIR.Dialects.chlo.broadcast_next_after Method
broadcast_next_after
Returns the next representable value of lhs
in the direction of rhs
, element-wise. It can also return a subnormal number.
Equivalent to the C++ std::nextafter function.
sourceReactant.MLIR.Dialects.chlo.broadcast_or Method
broadcast_or
Returns logical_or(lhs, rhs)
element-wise.
See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.
sourceReactant.MLIR.Dialects.chlo.broadcast_polygamma Method
broadcast_polygamma
Returns Polygamma(operand, operand)
element-wise.
Reactant.MLIR.Dialects.chlo.broadcast_power Method
broadcast_power
Returns lhs ^ rhs
element-wise.
See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.
sourceReactant.MLIR.Dialects.chlo.broadcast_remainder Method
broadcast_remainder
Returns lhs % rhs
element-wise.
See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.
sourceReactant.MLIR.Dialects.chlo.broadcast_select Method
broadcast_select
Constructs an output array from elements of two input arrays, based on the values of a predicate array.
See https://www.tensorflow.org/xla/operation_semantics#select
sourceReactant.MLIR.Dialects.chlo.broadcast_shift_left Method
broadcast_shift_left
Returns lhs << rhs
element-wise.
See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.
sourceReactant.MLIR.Dialects.chlo.broadcast_shift_right_arithmetic Method
broadcast_shift_right_arithmetic
Returns lhs >> rhs
element-wise.
See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.
sourceReactant.MLIR.Dialects.chlo.broadcast_shift_right_logical Method
broadcast_shift_right_logical
Returns lhs >> rhs
element-wise.
See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.
sourceReactant.MLIR.Dialects.chlo.broadcast_subtract Method
broadcast_subtract
Returns lhs - rhs
element-wise.
See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.
sourceReactant.MLIR.Dialects.chlo.broadcast_xor Method
broadcast_xor
Returns logical_xor(lhs, rhs)
element-wise.
See https://www.tensorflow.org/xla/operation_semantics#element-wise_binary_arithmetic_operations.
sourceReactant.MLIR.Dialects.chlo.broadcast_zeta Method
broadcast_zeta
Returns Zeta(operand, operand)
element-wise.
$
(\zeta(x, q) = \sum_{n=0}^{\infty} (q + n)^{-x}) $
sourceReactant.MLIR.Dialects.chlo.conj Method
conj
Returns Conj(operand)
element-wise.
$
\conj(x) = (\real(x), \neg(\imag(x))) $
sourceReactant.MLIR.Dialects.chlo.constant_like Method
constant_like
Returns a splat constant of the same shape as the operand.
sourceReactant.MLIR.Dialects.chlo.cosh Method
cosh
Returns Cosh(operand)
element-wise.
$
\cosh(x) = (e^x + e^-x) / 2 $
sourceReactant.MLIR.Dialects.chlo.erf Method
erf
Computes the Gauss error function of x
element-wise.
erf(x) = erf_impl(x) if |x| < 1 = 1 - erfc_impl(x) otherwise
sourceReactant.MLIR.Dialects.chlo.erfc Method
erfc
Computes an approximation of the error function complement (1 - erf(x)).
erfc(x) = erfc_impl(x) if |x| > 1 = 1 - erf_impl(x) otherwise
sourceReactant.MLIR.Dialects.chlo.is_neg_inf Method
is_neg_inf
Returns if a value is -inf element-wise.
sourceReactant.MLIR.Dialects.chlo.is_pos_inf Method
is_pos_inf
Returns if a value is +inf element-wise.
sourceReactant.MLIR.Dialects.chlo.next_after Method
next_after
Returns the next representable value of x
in the direction of y
, element-wise. It can also return a subnormal number.
Equivalent to the C++ std::nextafter function.
sourceReactant.MLIR.Dialects.chlo.polygamma Method
polygamma
Returns Polygamma(operand, operand)
element-wise.
Reactant.MLIR.Dialects.chlo.ragged_dot Method
ragged_dot
This operation takes three tensor args–-lhs, rhs, and group_sizes–-and a "ragged_dot_dimension_numbers" attribute. Like dot_general, the lhs and rhs are allowed arbitrary batch and contracting dimensions. Additionally, the lhs is required to have one ragged dimension, and the rhs may have at most one group dimension. The op has three modes, depending on the kind of the lhs ragged dimension.
In mode 1, the shape-signature is [b,m,k], [g,b,k,n], [b,g] -> [b,m,n]
. Here the ragged dimension is an lhs non-contracting dimension (m
). The dimensions b
and k
represent batch and contracting dimensions respectively. The rhs is required to have a group dimension (g
).
In mode 2, the shape-signature is [b,m,k], [b,k,n], [b,g] -> [g,b,m,n]
. Here the ragged dimension is an lhs/rhs contracting dimension (k
).
In mode 3, the shape-signature is [b,m,k], [b,k,n], [g] -> [b,m,n]
. Here the ragged dimension is an lhs/rhs batch dimension (b
).
Reactant.MLIR.Dialects.chlo.sinh Method
sinh
Returns Sinh(operand)
element-wise.
$
\sinh(x) = (e^x - e^-x) / 2 if |x| < 1 = e^(x + log(1/2)) - e^(-x + log(1/2)) otherwise. $
sourceReactant.MLIR.Dialects.chlo.square Method
square
Returns Square(operand)
element-wise.
$
\square(x) = complex((x.real - x.imag) * (x.real + x.imag), x.real * x.imag * 2) if x is a complex number = x * x otherwise $
sourceReactant.MLIR.Dialects.chlo.tan Method
tan
Returns Tan(operand)
element-wise.
$
\tan(x) = \sin(x) / \cos(x) $
sourceReactant.MLIR.Dialects.chlo.top_k Method
top_k
If the input is a vector (rank-1), finds the k
largest entries in the vector and outputs their values and indices as vectors. Thus values[j]
is the j
-th largest entry in input
, and its index is indices[j]
.
For matrices (resp. higher rank input), computes the top k
entries in each row (resp. vector along the last dimension). Thus,
values.shape = indices.shape = input.shape[:-1] + [k]
If two elements are equal, the lower-index element appears first.
sourceReactant.MLIR.Dialects.chlo.zeta Method
zeta
Returns Zeta(operand, operand)
element-wise.
$
(\zeta(x, q) = \sum_{n=0}^{\infty} (q + n)^{-x}) $
source