mlir.dialects._math_ops_gen¶
Attributes¶
Classes¶
The |
|
The |
|
The |
|
Syntax: |
|
Syntax: |
|
Syntax: |
|
The |
|
The |
|
Syntax: |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
expm1(x) := exp(x) - 1 |
|
The |
|
The |
|
The |
|
The |
|
The |
|
Determines if the given floating-point number has finite value i.e. it |
|
Determines if the given floating-point number is positive or negative |
|
Determines if the given floating-point number is a not-a-number (NaN) |
|
Determines if the given floating-point number is normal, i.e. is neither |
|
Computes the base-e logarithm of one plus the given value. It takes one |
|
Computes the base-2 logarithm of the given value. It takes one operand of |
|
Computes the base-10 logarithm of the given value. It takes one operand of |
|
Computes the base-e logarithm of the given value. It takes one operand of |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_irThe
absfoperation 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_irThe
absioperation 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_irThe
acosoperation 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_irSyntax:
operation ::= ssa-id `=` `math.acosh` ssa-use `:` type
The
acoshoperation 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_irSyntax:
operation ::= ssa-id `=` `math.asin` ssa-use `:` type
The
asinoperation 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_irSyntax:
operation ::= ssa-id `=` `math.asinh` ssa-use `:` type
The
asinhoperation 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_irThe
atan2operation 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_irThe
atanoperation 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_irSyntax:
operation ::= ssa-id `=` `math.atanh` ssa-use `:` type
The
atanhoperation 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_irThe
cbrtoperation 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_irThe
ceiloperation 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_irThe
clampfoperation 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_irThe
copysignreturns 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_irThe
cosoperation 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_irThe
coshoperation 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_irThe
ctlzoperation 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_irThe
cttzoperation 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_irThe
ctpopoperation 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_irThe
erfoperation 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_irThe
erfcoperation 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_irThe
expoperation 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_irexpm1(x) := exp(x) - 1
The
expm1operation 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_irThe
expoperation 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_irThe
fpowioperation takes abaseoperand of floating point type (i.e. scalar, tensor or vector) and apoweroperand of integer type (also scalar, tensor or vector) and returns one result of the same type asbase. The result isbaseraised to the power ofpower. 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_irThe
flooroperation 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_irThe
fmaoperation 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.fmaintrinsic. In the particular case of lowering to LLVM, this is guaranteed to lower to thellvm.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_irThe
ipowioperation 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_irDetermines 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_irDetermines 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_irDetermines 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_irDetermines 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_irComputes 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_irComputes 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_irComputes 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_irComputes 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_irThe
powfoperation 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_irThe
roundevenoperation 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_irThe
roundoperation 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_irThe
rsqrtoperation 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_irThe
sinoperation 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_irThe
sincosoperation 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_irThe
sinhoperation 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_irThe
sqrtoperation 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_irThe
tanoperation 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_irThe
tanhoperation 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_irThe
truncoperation 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¶