mlir.dialects.affine

Classes

AffineForOp

Specialization for the Affine for op class.

AffineIfOp

Specialization for the Affine if op class.

Functions

for_(start, stop[, step, iter_args, loc, ip])

Module Contents

class mlir.dialects.affine.AffineForOp(lower_bound: int | mlir.dialects._ods_common.ResultValueT | AffineMap, upper_bound: int | mlir.dialects._ods_common.ResultValueT | AffineMap | None, step: int | Attribute | None = None, iter_args: mlir.dialects._ods_common.ResultValueT | None = None, *, lower_bound_operands: mlir.dialects._ods_common.VariadicResultValueT | None = None, upper_bound_operands: mlir.dialects._ods_common.VariadicResultValueT | None = None, loc=None, ip=None)

Bases: AffineForOp

Specialization for the Affine for op class.

property body

Returns the body (block) of the loop.

property induction_variable

Returns the induction variable of the loop.

property inner_iter_args

Returns the loop-carried arguments usable within the loop.

To obtain the loop-carried operands, use iter_args.

mlir.dialects.affine.for_(start, stop, step=None, iter_args: Sequence[Value] | None = None, *, loc=None, ip=None)
class mlir.dialects.affine.AffineIfOp(cond: IntegerSet, results_: Type | None = None, *, cond_operands: mlir.dialects._ods_common.VariadicResultValueT | None = None, has_else: bool = False, loc=None, ip=None)

Bases: AffineIfOp

Specialization for the Affine if op class.

property then_block: Block

Returns the then block of the if operation.

property else_block: Block | None

Returns the else block of the if operation.