mlir.dialects.transform.tune¶
Classes¶
Provides a representation for "tunables" within schedules. |
|
This op represents a choice over which of its regions is to be used. |
Functions¶
|
|
|
Module Contents¶
- class mlir.dialects.transform.tune.KnobOp(result: mlir.ir.Type, name: mlir.ir.StringAttr | str, options: mlir.ir.ArrayAttr | Sequence[mlir.ir.Attribute | bool | int | float | str] | mlir.ir.Attribute, *, selected: mlir.ir.Attribute | bool | int | float | str | None = None, loc=None, ip=None)¶
Bases:
KnobOpProvides a representation for “tunables” within schedules.
Each op represents a single tunable, which has a
nameand a set of validoptionsdescribed by an attribute. Without a specifiedselectedoption, this op represents a non-deterministic choice that has yet to be resolved – as such, the interpreter runtime semantics is to raise a failure.The non-deterministic choice is resolved through providing a
selectedattribute. When provided, the interpreter runtime semantics are to return theselectedattribute as a param through the op’s result.In case the
optionsattribute is anArrayAttr, the verifier checks that the providedselectedattribute occurs inoptions.
- mlir.dialects.transform.tune.knob(result: mlir.ir.Type, name: mlir.ir.StringAttr | str, options: mlir.ir.ArrayAttr | Sequence[mlir.ir.Attribute | bool | int | float | str] | mlir.ir.Attribute, *, selected: mlir.ir.Attribute | bool | int | float | str | None = None, loc=None, ip=None)¶
- class mlir.dialects.transform.tune.AlternativesOp(results: Sequence[mlir.ir.Type], name: mlir.ir.StringAttr | str, num_alternatives: int, *, selected_region: int | mlir.ir.IntegerAttr | mlir.ir.Value | mlir.ir.Operation | mlir.ir.OpView | None = None, loc=None, ip=None)¶
Bases:
AlternativesOpThis op represents a choice over which of its regions is to be used.
When
selected_regionis provided, the semantics are that this op is to be substituted for by the selected region, meaning the region’s results become the results of this op. Without a providedselected_region, the semantics are that this non-deterministic choice is yet to be resolved – which in terms of the op’s interpreted semantics is a failure.The
selected_regionargument is either anIntegerAttror a param holding anIntegerAttr, which should provide a valid zero-based index with respect to the number of alternatives, i.e. regions.
- mlir.dialects.transform.tune.alternatives(results: Sequence[mlir.ir.Type], name: mlir.ir.StringAttr | str, num_alternatives: int, *, selected_region: int | mlir.ir.IntegerAttr | mlir.ir.Value | mlir.ir.Operation | mlir.ir.OpView | None = None, loc=None, ip=None)¶