mlir.dialects._math_ops_gen

Attributes

Classes

_Dialect

AbsFOp

The absf operation computes the absolute value. It takes one operand of

AbsIOp

The absi operation computes the absolute value. It takes one operand of

AcosOp

The acos operation computes the arcus cosine of a given value. It takes one

AcoshOp

Syntax:

AsinOp

Syntax:

AsinhOp

Syntax:

Atan2Op

The atan2 operation takes two operands and returns one result, all of

AtanOp

The atan operation computes the arcus tangent of a given value. It takes

AtanhOp

Syntax:

CbrtOp

The cbrt operation computes the cube root. It takes one operand of

CeilOp

The ceil operation computes the ceiling of a given value. It takes one

ClampFOp

The clampf operation takes three operands and returns one result, each of

CopySignOp

The copysign returns a value with the magnitude of the first operand and

CosOp

The cos operation computes the cosine of a given value. It takes one

CoshOp

The cosh operation computes the hyperbolic cosine. It takes one operand

CountLeadingZerosOp

The ctlz operation computes the number of leading zeros of an integer value.

CountTrailingZerosOp

The cttz operation computes the number of trailing zeros of an integer value.

CtPopOp

The ctpop operation computes the number of set bits of an integer value.

ErfOp

The erf operation computes the error function. It takes one operand of

ErfcOp

The erfc operation computes the complementary error function, defined as

Exp2Op

The exp operation takes one operand of floating point type (i.e., scalar,

ExpM1Op

expm1(x) := exp(x) - 1

ExpOp

The exp operation takes one operand of floating point type (i.e., scalar,

FPowIOp

The fpowi operation takes a base operand of floating point type

FloorOp

The floor operation computes the floor of a given value. It takes one

FmaOp

The fma operation takes three operands and returns one result, each of

IPowIOp

The ipowi operation takes two operands of integer type (i.e., scalar,

IsFiniteOp

Determines if the given floating-point number has finite value i.e. it

IsInfOp

Determines if the given floating-point number is positive or negative

IsNaNOp

Determines if the given floating-point number is a not-a-number (NaN)

IsNormalOp

Determines if the given floating-point number is normal, i.e. is neither

Log1pOp

Computes the base-e logarithm of one plus the given value. It takes one

Log2Op

Computes the base-2 logarithm of the given value. It takes one operand of

Log10Op

Computes the base-10 logarithm of the given value. It takes one operand of

LogOp

Computes the base-e logarithm of the given value. It takes one operand of

PowFOp

The powf operation takes two operands of floating point type (i.e.,

RoundEvenOp

The roundeven operation returns the operand rounded to the nearest integer

RoundOp

The round operation returns the operand rounded to the nearest integer

RsqrtOp

The rsqrt operation computes the reciprocal of the square root. It takes

SinOp

The sin operation computes the sine of a given value. It takes one

SincosOp

The sincos operation computes both the sine and cosine of a given value

SinhOp

The sinh operation computes the hyperbolic sine. It takes one operand

SqrtOp

The sqrt operation computes the square root. It takes one operand of

TanOp

The tan operation computes the tangent. It takes one operand

TanhOp

The tanh operation computes the hyperbolic tangent. It takes one operand

TruncOp

The trunc operation returns the operand rounded to the nearest integer

Functions

absf(→ _ods_ir)

absi(→ _ods_ir)

acos(→ _ods_ir)

acosh(→ _ods_ir)

asin(→ _ods_ir)

asinh(→ _ods_ir)

atan2(→ _ods_ir)

atan(→ _ods_ir)

atanh(→ _ods_ir)

cbrt(→ _ods_ir)

ceil(→ _ods_ir)

clampf(→ _ods_ir)

copysign(→ _ods_ir)

cos(→ _ods_ir)

cosh(→ _ods_ir)

ctlz(→ _ods_ir)

cttz(→ _ods_ir)

ctpop(→ _ods_ir)

erf(→ _ods_ir)

erfc(→ _ods_ir)

exp2(→ _ods_ir)

expm1(→ _ods_ir)

exp(→ _ods_ir)

fpowi(→ _ods_ir)

floor(→ _ods_ir)

fma(→ _ods_ir)

ipowi(→ _ods_ir)

isfinite(→ _ods_ir)

isinf(→ _ods_ir)

isnan(→ _ods_ir)

isnormal(→ _ods_ir)

log1p(→ _ods_ir)

log2(→ _ods_ir)

log10(→ _ods_ir)

log(→ _ods_ir)

powf(→ _ods_ir)

roundeven(→ _ods_ir)

round(→ _ods_ir)

rsqrt(→ _ods_ir)

sin(→ _ods_ir)

sincos(→ _ods_ir)

sinh(→ _ods_ir)

sqrt(→ _ods_ir)

tan(→ _ods_ir)

tanh(→ _ods_ir)

trunc(→ _ods_ir)

Module Contents

mlir.dialects._math_ops_gen._ods_ir
class mlir.dialects._math_ops_gen._Dialect(descriptor: object)

Bases: _ods_ir

DIALECT_NAMESPACE = 'math'
class mlir.dialects._math_ops_gen.AbsFOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The absf operation computes the absolute value. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type.

Example:

// Scalar absolute value.
%a = math.absf %b : f64
OPERATION_NAME = 'math.absf'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.absf(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.AbsIOp(operand, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The absi operation computes the absolute value. It takes one operand of integer type (i.e., scalar, tensor or vector) and returns one result of the same type.

Example:

// Scalar absolute value.
%a = math.absi %b : i64
OPERATION_NAME = 'math.absi'
_ODS_REGIONS = (0, True)
operand() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.absi(operand, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.AcosOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The acos operation computes the arcus cosine of a given value. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar arcus cosine value.
%a = math.acos %b : f64
OPERATION_NAME = 'math.acos'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.acos(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.AcoshOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

Syntax:

operation ::= ssa-id `=` `math.acosh` ssa-use `:` type

The acosh operation computes the arcus cosine of a given value. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Hyperbolic arcus cosine of scalar value.
%a = math.acosh %b : f64
OPERATION_NAME = 'math.acosh'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.acosh(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.AsinOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

Syntax:

operation ::= ssa-id `=` `math.asin` ssa-use `:` type

The asin operation computes the arcus sine of a given value. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Arcus sine of scalar value.
%a = math.asin %b : f64
OPERATION_NAME = 'math.asin'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.asin(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.AsinhOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

Syntax:

operation ::= ssa-id `=` `math.asinh` ssa-use `:` type

The asinh operation computes the hyperbolic arcus sine of a given value. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Hyperbolic arcus sine of scalar value.
%a = math.asinh %b : f64
OPERATION_NAME = 'math.asinh'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.asinh(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.Atan2Op(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The atan2 operation takes two operands and returns one result, all of which must be of the same type. The operands must be of floating point type (i.e., scalar, tensor or vector).

The 2-argument arcus tangent atan2(y, x) returns the angle in the Euclidian plane between the positive x-axis and the ray through the point (x, y). It is a generalization of the 1-argument arcus tangent which returns the angle on the basis of the ratio y/x.

See also https://en.wikipedia.org/wiki/Atan2

Example:

// Scalar variant.
%a = math.atan2 %b, %c : f32
OPERATION_NAME = 'math.atan2'
_ODS_REGIONS = (0, True)
lhs() _ods_ir
rhs() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.atan2(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.AtanOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The atan operation computes the arcus tangent of a given value. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Arcus tangent of scalar value.
%a = math.atan %b : f64
OPERATION_NAME = 'math.atan'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.atan(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.AtanhOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

Syntax:

operation ::= ssa-id `=` `math.atanh` ssa-use `:` type

The atanh operation computes the hyperbolic arcus tangent of a given value. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Hyperbolic arcus tangent of scalar value.
%a = math.atanh %b : f64
OPERATION_NAME = 'math.atanh'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.atanh(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.CbrtOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The cbrt operation computes the cube root. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar cube root value.
%a = math.cbrt %b : f64

Note: This op is not equivalent to powf(…, 1/3.0).

OPERATION_NAME = 'math.cbrt'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.cbrt(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.CeilOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The ceil operation computes the ceiling of a given value. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar ceiling value.
%a = math.ceil %b : f64
OPERATION_NAME = 'math.ceil'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.ceil(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.ClampFOp(value, min, max, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The clampf operation takes three operands and returns one result, each of these is required to be the same type. Operands must be of floating point type (i.e., scalar, tensor or vector).

The semantics of the operation are described by:

clampf(value, min, max) = maxf(minf(value, min), max)

Example:

%d = math.clampf %value to [%min, %max] : f64
OPERATION_NAME = 'math.clampf'
_ODS_REGIONS = (0, True)
value() _ods_ir
min() _ods_ir
max() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.clampf(value, min, max, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.CopySignOp(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The copysign returns a value with the magnitude of the first operand and the sign of the second operand. It takes two operands and returns one result of the same type. The operands must be of floating point type (i.e., scalar, tensor or vector). It has no standard attributes.

Example:

// Scalar copysign value.
%a = math.copysign %b, %c : f64
OPERATION_NAME = 'math.copysign'
_ODS_REGIONS = (0, True)
lhs() _ods_ir
rhs() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.copysign(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.CosOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The cos operation computes the cosine of a given value. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar cosine value.
%a = math.cos %b : f64
OPERATION_NAME = 'math.cos'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.cos(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.CoshOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The cosh operation computes the hyperbolic cosine. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar hyperbolic cosine value.
%a = math.cosh %b : f64
OPERATION_NAME = 'math.cosh'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.cosh(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.CountLeadingZerosOp(operand, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The ctlz operation computes the number of leading zeros of an integer value. It operates on scalar, tensor or vector.

Example:

// Scalar ctlz function value.
%a = math.ctlz %b : i32
OPERATION_NAME = 'math.ctlz'
_ODS_REGIONS = (0, True)
operand() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.ctlz(operand, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.CountTrailingZerosOp(operand, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The cttz operation computes the number of trailing zeros of an integer value. It operates on scalar, tensor or vector.

Example:

// Scalar cttz function value.
%a = math.cttz %b : i32
OPERATION_NAME = 'math.cttz'
_ODS_REGIONS = (0, True)
operand() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.cttz(operand, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.CtPopOp(operand, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The ctpop operation computes the number of set bits of an integer value. It operates on scalar, tensor or vector.

Example:

// Scalar ctpop function value.
%a = math.ctpop %b : i32
OPERATION_NAME = 'math.ctpop'
_ODS_REGIONS = (0, True)
operand() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.ctpop(operand, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.ErfOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The erf operation computes the error function. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar error function value.
%a = math.erf %b : f64
OPERATION_NAME = 'math.erf'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.erf(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.ErfcOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The erfc operation computes the complementary error function, defined as 1-erf(x). This function is part of libm and is needed for accuracy, since simply calculating 1-erf(x) when x is close to 1 will give inaccurate results. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar error function value.
%a = math.erfc %b : f64
OPERATION_NAME = 'math.erfc'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.erfc(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.Exp2Op(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The exp operation takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar natural exponential.
%a = math.exp2 %b : f64
OPERATION_NAME = 'math.exp2'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.exp2(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.ExpM1Op(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

expm1(x) := exp(x) - 1

The expm1 operation takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar natural exponential minus 1.
%a = math.expm1 %b : f64
OPERATION_NAME = 'math.expm1'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.expm1(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.ExpOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The exp operation takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar natural exponential.
%a = math.exp %b : f64
OPERATION_NAME = 'math.exp'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.exp(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.FPowIOp(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The fpowi operation takes a base operand of floating point type (i.e. scalar, tensor or vector) and a power operand of integer type (also scalar, tensor or vector) and returns one result of the same type as base. The result is base raised to the power of power. The operation is elementwise for non-scalars, e.g.:

%v = math.fpowi %base, %power : vector<2xf32>, vector<2xi32

The result is a vector of:

[<math.fpowi %base[0], %power[0]>, <math.fpowi %base[1], %power[1]>]

Example:

// Scalar exponentiation.
%a = math.fpowi %base, %power : f64, i32
OPERATION_NAME = 'math.fpowi'
_ODS_REGIONS = (0, True)
lhs() _ods_ir
rhs() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.fpowi(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.FloorOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The floor operation computes the floor of a given value. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar floor value.
%a = math.floor %b : f64
OPERATION_NAME = 'math.floor'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.floor(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.FmaOp(a, b, c, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The fma operation takes three operands and returns one result, each of these is required to be the same type. Operands must be of floating point type (i.e., scalar, tensor or vector).

Example:

// Scalar fused multiply-add: d = a*b + c
%d = math.fma %a, %b, %c : f64

The semantics of the operation correspond to those of the llvm.fma intrinsic. In the particular case of lowering to LLVM, this is guaranteed to lower to the llvm.fma.* intrinsic.

OPERATION_NAME = 'math.fma'
_ODS_REGIONS = (0, True)
a() _ods_ir
b() _ods_ir
c() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.fma(a, b, c, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.IPowIOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The ipowi operation takes two operands of integer type (i.e., scalar, tensor or vector) and returns one result of the same type. Operands must have the same type.

Example:

// Scalar signed integer exponentiation.
%a = math.ipowi %b, %c : i32
OPERATION_NAME = 'math.ipowi'
_ODS_REGIONS = (0, True)
lhs() _ods_ir
rhs() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.ipowi(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.IsFiniteOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

Determines if the given floating-point number has finite value i.e. it is normal, subnormal or zero, but not infinite or NaN.

Example:

%f = math.isfinite %a : f32
OPERATION_NAME = 'math.isfinite'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.isfinite(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.IsInfOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

Determines if the given floating-point number is positive or negative infinity.

Example:

%f = math.isinf %a : f32
OPERATION_NAME = 'math.isinf'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.isinf(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.IsNaNOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

Determines if the given floating-point number is a not-a-number (NaN) value.

Example:

%f = math.isnan %a : f32
OPERATION_NAME = 'math.isnan'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.isnan(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.IsNormalOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

Determines if the given floating-point number is normal, i.e. is neither zero, subnormal, infinite, nor NaN.

Example:

%f = math.isnormal %a : f32
OPERATION_NAME = 'math.isnormal'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.isnormal(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.Log1pOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

Computes the base-e logarithm of one plus the given value. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type.

log1p(x) := log(1 + x)

Example:

// Scalar log1p operation.
%y = math.log1p %x : f64
OPERATION_NAME = 'math.log1p'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.log1p(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.Log2Op(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

Computes the base-2 logarithm of the given value. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type.

Example:

// Scalar log2 operation.
%y = math.log2 %x : f64
OPERATION_NAME = 'math.log2'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.log2(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.Log10Op(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

Computes the base-10 logarithm of the given value. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type.

Example:

// Scalar log10 operation.
%y = math.log10 %x : f64
OPERATION_NAME = 'math.log10'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.log10(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.LogOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

Computes the base-e logarithm of the given value. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type.

Example:

// Scalar log operation.
%y = math.log %x : f64
OPERATION_NAME = 'math.log'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.log(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.PowFOp(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The powf operation takes two operands of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. Operands must have the same type.

Example:

// Scalar exponentiation.
%a = math.powf %b, %c : f64
OPERATION_NAME = 'math.powf'
_ODS_REGIONS = (0, True)
lhs() _ods_ir
rhs() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.powf(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.RoundEvenOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The roundeven operation returns the operand rounded to the nearest integer value in floating-point format. It takes one operand of floating point type (i.e., scalar, tensor or vector) and produces one result of the same type. The operation rounds the argument to the nearest integer value in floating-point format, rounding halfway cases to even, regardless of the current rounding direction.

Example:

// Scalar round operation.
%a = math.roundeven %b : f64
OPERATION_NAME = 'math.roundeven'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.roundeven(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.RoundOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The round operation returns the operand rounded to the nearest integer value in floating-point format. It takes one operand of floating point type (i.e., scalar, tensor or vector) and produces one result of the same type. The operation rounds the argument to the nearest integer value in floating-point format, rounding halfway cases away from zero, regardless of the current rounding direction.

Example:

// Scalar round operation.
%a = math.round %b : f64
OPERATION_NAME = 'math.round'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.round(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.RsqrtOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The rsqrt operation computes the reciprocal of the square root. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar reciprocal square root value.
%a = math.rsqrt %b : f64
OPERATION_NAME = 'math.rsqrt'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.rsqrt(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.SinOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The sin operation computes the sine of a given value. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar sine value.
%a = math.sin %b : f64
OPERATION_NAME = 'math.sin'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.sin(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.SincosOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The sincos operation computes both the sine and cosine of a given value simultaneously. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns two results of the same type. This operation can be more efficient than computing sine and cosine separately when both values are needed.

Example:

// Scalar sine and cosine values.
%sin, %cos = math.sincos %input : f64
OPERATION_NAME = 'math.sincos'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
sin() _ods_ir
cos() _ods_ir
mlir.dialects._math_ops_gen.sincos(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.SinhOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The sinh operation computes the hyperbolic sine. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar hyperbolic sine value.
%a = math.sinh %b : f64
OPERATION_NAME = 'math.sinh'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.sinh(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.SqrtOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The sqrt operation computes the square root. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar square root value.
%a = math.sqrt %b : f64
OPERATION_NAME = 'math.sqrt'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.sqrt(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.TanOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The tan operation computes the tangent. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar tangent value.
%a = math.tan %b : f64
OPERATION_NAME = 'math.tan'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.tan(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.TanhOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The tanh operation computes the hyperbolic tangent. It takes one operand of floating point type (i.e., scalar, tensor or vector) and returns one result of the same type. It has no standard attributes.

Example:

// Scalar hyperbolic tangent value.
%a = math.tanh %b : f64
OPERATION_NAME = 'math.tanh'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.tanh(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._math_ops_gen.TruncOp(operand, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The trunc operation returns the operand rounded to the nearest integer value in floating-point format. It takes one operand of floating point type (i.e., scalar, tensor or vector) and produces one result of the same type. The operation always rounds to the nearest integer not larger in magnitude than the operand, regardless of the current rounding direction.

Example:

// Scalar trunc operation.
%a = math.trunc %b : f64
OPERATION_NAME = 'math.trunc'
_ODS_REGIONS = (0, True)
operand() _ods_ir
fastmath() _ods_ir
result() _ods_ir

Shortcut to get an op result if it has only one (throws an error otherwise).

mlir.dialects._math_ops_gen.trunc(operand, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir