mlir.dialects._complex_ops_gen

Attributes

Classes

_Dialect

AbsOp

The abs op takes a single complex number and computes its absolute value.

AddOp

The add operation takes two complex numbers and returns their sum.

AngleOp

The angle op takes a single complex number and computes its argument value with a branch cut along the negative real axis.

Atan2Op

For complex numbers it is expressed using complex logarithm

BitcastOp

Example:

ConjOp

The conj op takes a single complex number and computes the

ConstantOp

The complex.constant operation creates a constant complex number from an

CosOp

The cos op takes a single complex number and computes the cosine of

CreateOp

The complex.create operation creates a complex number from two

DivOp

The div operation takes two complex numbers and returns result of their

EqualOp

The eq op takes two complex numbers and returns whether they are equal.

ExpOp

The exp op takes a single complex number and computes the exponential of

Expm1Op

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

ImOp

The im op takes a single complex number and extracts the imaginary part.

Log1pOp

The log op takes a single complex number and computes the natural

LogOp

The log op takes a single complex number and computes the natural

MulOp

The mul operation takes two complex numbers and returns their product:

NegOp

The neg op takes a single complex number complex and returns -complex.

NotEqualOp

The neq op takes two complex numbers and returns whether they are not

PowOp

The pow operation takes a complex number raises it to the given complex

PowiOp

The powi operation takes a base operand of complex type and a power

ReOp

The re op takes a single complex number and extracts the real part.

RsqrtOp

The rsqrt operation computes reciprocal of square root.

SignOp

The sign op takes a single complex number and computes the sign of

SinOp

The sin op takes a single complex number and computes the sine of

SqrtOp

The sqrt operation takes a complex number and returns its square root.

SubOp

The sub operation takes two complex numbers and returns their difference.

TanOp

The tan op takes a single complex number and computes the tangent of

TanhOp

The tanh operation takes a complex number and returns its hyperbolic

Functions

abs(→ _ods_ir)

add(→ _ods_ir)

angle(→ _ods_ir)

atan2(→ _ods_ir)

bitcast(→ _ods_ir)

conj(→ _ods_ir)

constant(→ _ods_ir)

cos(→ _ods_ir)

create_(→ _ods_ir)

div(→ _ods_ir)

eq(→ _ods_ir)

exp(→ _ods_ir)

expm1(→ _ods_ir)

im(→ _ods_ir)

log1p(→ _ods_ir)

log(→ _ods_ir)

mul(→ _ods_ir)

neg(→ _ods_ir)

neq(→ _ods_ir)

pow(→ _ods_ir)

powi(→ _ods_ir)

re(→ _ods_ir)

rsqrt(→ _ods_ir)

sign(→ _ods_ir)

sin(→ _ods_ir)

sqrt(→ _ods_ir)

sub(→ _ods_ir)

tan(→ _ods_ir)

tanh(→ _ods_ir)

Module Contents

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

Bases: _ods_ir

DIALECT_NAMESPACE = 'complex'
class mlir.dialects._complex_ops_gen.AbsOp(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The abs op takes a single complex number and computes its absolute value.

Example:

%a = complex.abs %b : complex<f32>
OPERATION_NAME = 'complex.abs'
_ODS_REGIONS = (0, True)
complex() _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._complex_ops_gen.abs(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.AddOp(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The add operation takes two complex numbers and returns their sum.

Example:

%a = complex.add %b, %c : complex<f32>
OPERATION_NAME = 'complex.add'
_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._complex_ops_gen.add(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.AngleOp(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The angle op takes a single complex number and computes its argument value with a branch cut along the negative real axis.

Example:

%a = complex.angle %b : complex<f32>
OPERATION_NAME = 'complex.angle'
_ODS_REGIONS = (0, True)
complex() _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._complex_ops_gen.angle(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.Atan2Op(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

For complex numbers it is expressed using complex logarithm atan2(y, x) = -i * log((x + i * y) / sqrt(x**2 + y**2))

Example:

%a = complex.atan2 %b, %c : complex<f32>
OPERATION_NAME = 'complex.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._complex_ops_gen.atan2(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.BitcastOp(result, operand, *, loc=None, ip=None)

Bases: _ods_ir

Example:

%a = complex.bitcast %b : complex<f32> -> i64
OPERATION_NAME = 'complex.bitcast'
_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._complex_ops_gen.bitcast(result, operand, *, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.ConjOp(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The conj op takes a single complex number and computes the complex conjugate.

Example:

%a = complex.conj %b: complex<f32>
OPERATION_NAME = 'complex.conj'
_ODS_REGIONS = (0, True)
complex() _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._complex_ops_gen.conj(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.ConstantOp(complex, value, *, loc=None, ip=None)

Bases: _ods_ir

The complex.constant operation creates a constant complex number from an attribute containing the real and imaginary parts.

Example:

%a = complex.constant [0.1, -1.0] : complex<f64>
OPERATION_NAME = 'complex.constant'
_ODS_REGIONS = (0, True)
value() _ods_ir
complex() _ods_ir
mlir.dialects._complex_ops_gen.constant(complex, value, *, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.CosOp(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The cos op takes a single complex number and computes the cosine of it, i.e. cos(x), where x is the input value.

Example:

%a = complex.cos %b : complex<f32>
OPERATION_NAME = 'complex.cos'
_ODS_REGIONS = (0, True)
complex() _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._complex_ops_gen.cos(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.CreateOp(complex, real, imaginary, *, loc=None, ip=None)

Bases: _ods_ir

The complex.create operation creates a complex number from two floating-point operands, the real and the imaginary part.

Example:

%a = complex.create %b, %c : complex<f32>
OPERATION_NAME = 'complex.create'
_ODS_REGIONS = (0, True)
real() _ods_ir
imaginary() _ods_ir
complex() _ods_ir
mlir.dialects._complex_ops_gen.create_(complex, real, imaginary, *, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.DivOp(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The div operation takes two complex numbers and returns result of their division:

%a = complex.div %b, %c : complex<f32>
OPERATION_NAME = 'complex.div'
_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._complex_ops_gen.div(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.EqualOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The eq op takes two complex numbers and returns whether they are equal.

Example:

%a = complex.eq %b, %c : complex<f32>
OPERATION_NAME = 'complex.eq'
_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._complex_ops_gen.eq(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.ExpOp(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The exp op takes a single complex number and computes the exponential of it, i.e. exp(x) or e^(x), where x is the input value. e denotes Euler’s number and is approximately equal to 2.718281.

Example:

%a = complex.exp %b : complex<f32>
OPERATION_NAME = 'complex.exp'
_ODS_REGIONS = (0, True)
complex() _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._complex_ops_gen.exp(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.Expm1Op(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

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

Example:

%a = complex.expm1 %b : complex<f32>
OPERATION_NAME = 'complex.expm1'
_ODS_REGIONS = (0, True)
complex() _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._complex_ops_gen.expm1(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.ImOp(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The im op takes a single complex number and extracts the imaginary part.

Example:

%a = complex.im %b : complex<f32>
OPERATION_NAME = 'complex.im'
_ODS_REGIONS = (0, True)
complex() _ods_ir
fastmath() _ods_ir
imaginary() _ods_ir
mlir.dialects._complex_ops_gen.im(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.Log1pOp(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The log op takes a single complex number and computes the natural logarithm of one plus the given value, i.e. log(1 + x) or log_e(1 + x), where x is the input value. e denotes Euler’s number and is approximately equal to 2.718281.

Example:

%a = complex.log1p %b : complex<f32>
OPERATION_NAME = 'complex.log1p'
_ODS_REGIONS = (0, True)
complex() _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._complex_ops_gen.log1p(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.LogOp(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The log op takes a single complex number and computes the natural logarithm of it, i.e. log(x) or log_e(x), where x is the input value. e denotes Euler’s number and is approximately equal to 2.718281.

Example:

%a = complex.log %b : complex<f32>
OPERATION_NAME = 'complex.log'
_ODS_REGIONS = (0, True)
complex() _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._complex_ops_gen.log(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.MulOp(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The mul operation takes two complex numbers and returns their product:

%a = complex.mul %b, %c : complex<f32>
OPERATION_NAME = 'complex.mul'
_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._complex_ops_gen.mul(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.NegOp(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The neg op takes a single complex number complex and returns -complex.

Example:

%a = complex.neg %b : complex<f32>
OPERATION_NAME = 'complex.neg'
_ODS_REGIONS = (0, True)
complex() _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._complex_ops_gen.neg(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.NotEqualOp(lhs, rhs, *, results=None, loc=None, ip=None)

Bases: _ods_ir

The neq op takes two complex numbers and returns whether they are not equal.

Example:

%a = complex.neq %b, %c : complex<f32>
OPERATION_NAME = 'complex.neq'
_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._complex_ops_gen.neq(lhs, rhs, *, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.PowOp(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The pow operation takes a complex number raises it to the given complex exponent.

Example:

%a = complex.pow %b, %c : complex<f32>
OPERATION_NAME = 'complex.pow'
_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._complex_ops_gen.pow(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.PowiOp(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The powi operation takes a base operand of complex type and a power operand of signed integer type and returns one result of the same type as base. The result is base raised to the power of power.

Example:

%a = complex.powi %b, %c : complex<f32>, i32
OPERATION_NAME = 'complex.powi'
_ODS_REGIONS = (0, True)
lhs() _ods_ir
rhs() _ods_ir
fastmath() _ods_ir | None
result() _ods_ir

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

mlir.dialects._complex_ops_gen.powi(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.ReOp(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The re op takes a single complex number and extracts the real part.

Example:

%a = complex.re %b : complex<f32>
OPERATION_NAME = 'complex.re'
_ODS_REGIONS = (0, True)
complex() _ods_ir
fastmath() _ods_ir
real() _ods_ir
mlir.dialects._complex_ops_gen.re(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.RsqrtOp(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The rsqrt operation computes reciprocal of square root.

Example:

%a = complex.rsqrt %b : complex<f32>
OPERATION_NAME = 'complex.rsqrt'
_ODS_REGIONS = (0, True)
complex() _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._complex_ops_gen.rsqrt(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.SignOp(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The sign op takes a single complex number and computes the sign of it, i.e. y = sign(x) = x / |x| if x != 0, otherwise y = 0.

Example:

%a = complex.sign %b : complex<f32>
OPERATION_NAME = 'complex.sign'
_ODS_REGIONS = (0, True)
complex() _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._complex_ops_gen.sign(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.SinOp(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The sin op takes a single complex number and computes the sine of it, i.e. sin(x), where x is the input value.

Example:

%a = complex.sin %b : complex<f32>
OPERATION_NAME = 'complex.sin'
_ODS_REGIONS = (0, True)
complex() _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._complex_ops_gen.sin(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.SqrtOp(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The sqrt operation takes a complex number and returns its square root.

Example:

%a = complex.sqrt %b : complex<f32>
OPERATION_NAME = 'complex.sqrt'
_ODS_REGIONS = (0, True)
complex() _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._complex_ops_gen.sqrt(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.SubOp(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The sub operation takes two complex numbers and returns their difference.

Example:

%a = complex.sub %b, %c : complex<f32>
OPERATION_NAME = 'complex.sub'
_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._complex_ops_gen.sub(lhs, rhs, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.TanOp(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The tan op takes a single complex number and computes the tangent of it, i.e. tan(x), where x is the input value.

Example:

%a = complex.tan %b : complex<f32>
OPERATION_NAME = 'complex.tan'
_ODS_REGIONS = (0, True)
complex() _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._complex_ops_gen.tan(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir
class mlir.dialects._complex_ops_gen.TanhOp(complex, *, fastmath=None, results=None, loc=None, ip=None)

Bases: _ods_ir

The tanh operation takes a complex number and returns its hyperbolic tangent.

Example:

%a = complex.tanh %b : complex<f32>
OPERATION_NAME = 'complex.tanh'
_ODS_REGIONS = (0, True)
complex() _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._complex_ops_gen.tanh(complex, *, fastmath=None, results=None, loc=None, ip=None) _ods_ir