mlir.dialects._complex_ops_gen¶
Attributes¶
Classes¶
The |
|
The |
|
The |
|
For complex numbers it is expressed using complex logarithm |
|
Example: |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
complex.expm1(x) := complex.exp(x) - 1 |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_irThe
absop 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_irThe
addoperation 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_irThe
angleop 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_irFor 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_irExample:
%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_irThe
conjop 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_irThe
complex.constantoperation 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_irThe
cosop takes a single complex number and computes the cosine of it, i.e.cos(x), wherexis 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_irThe
complex.createoperation 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_irThe
divoperation 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_irThe
eqop 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_irThe
expop takes a single complex number and computes the exponential of it, i.e.exp(x)ore^(x), wherexis the input value.edenotes 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_ircomplex.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_irThe
imop 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_irThe
logop takes a single complex number and computes the natural logarithm of one plus the given value, i.e.log(1 + x)orlog_e(1 + x), wherexis the input value.edenotes 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_irThe
logop takes a single complex number and computes the natural logarithm of it, i.e.log(x)orlog_e(x), wherexis the input value.edenotes 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_irThe
muloperation 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_irThe
negop takes a single complex numbercomplexand 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_irThe
neqop 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_irThe
powoperation 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_irThe
powioperation takes abaseoperand of complex type and apoweroperand of signed integer type and returns one result of the same type asbase. The result isbaseraised to the power ofpower.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_irThe
reop 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_irThe
rsqrtoperation 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_irThe
signop takes a single complex number and computes the sign of it, i.e.y = sign(x) = x / |x|ifx != 0, otherwisey = 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_irThe
sinop takes a single complex number and computes the sine of it, i.e.sin(x), wherexis 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_irThe
sqrtoperation 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_irThe
suboperation 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_irThe
tanop takes a single complex number and computes the tangent of it, i.e.tan(x), wherexis 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_irThe
tanhoperation 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¶