mlir.dialects._transform_tune_extension_ops_gen

Attributes

Classes

AlternativesOp

This op represents a choice over which of its regions is to be used.

KnobOp

Provides a representation for "tunables" within schedules.

Functions

tune_alternatives(→ Union[_ods_ir, _ods_ir, ...)

tune_knob(→ _ods_ir)

Module Contents

mlir.dialects._transform_tune_extension_ops_gen._ods_ir
class mlir.dialects._transform_tune_extension_ops_gen.AlternativesOp(results_, name, num_alternatives, *, selected_region_attr=None, selected_region_param=None, loc=None, ip=None)

Bases: _ods_ir

This op represents a choice over which of its regions is to be used.

When selected_region is 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 provided selected_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_region argument is either an IntegerAttr or a param holding an IntegerAttr, which should provide a valid zero-based index with respect to the number of alternatives, i.e. regions.

OPERATION_NAME = 'transform.tune.alternatives'
_ODS_REGIONS = (0, False)
selected_region_param() _ods_ir | None
name() _ods_ir

Returns the fully qualified name of the operation.

selected_region_attr() _ods_ir | None
results_() _ods_ir
alternatives() _ods_ir
mlir.dialects._transform_tune_extension_ops_gen.tune_alternatives(results_, name, num_alternatives, *, selected_region_attr=None, selected_region_param=None, loc=None, ip=None) _ods_ir | _ods_ir | AlternativesOp
class mlir.dialects._transform_tune_extension_ops_gen.KnobOp(result, name, options, *, selected=None, loc=None, ip=None)

Bases: _ods_ir

Provides a representation for “tunables” within schedules.

Each op represents a single tunable, which has a name and a set of valid options described by an attribute. Without a specified selected option, 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 selected attribute. When provided, the interpreter runtime semantics are to return the selected attribute as a param through the op’s result.

In case the options attribute is an ArrayAttr, the verifier checks that the provided selected attribute occurs in options.

OPERATION_NAME = 'transform.tune.knob'
_ODS_REGIONS = (0, True)
name() _ods_ir

Returns the fully qualified name of the operation.

options() _ods_ir
selected() _ods_ir | None
result() _ods_ir

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

mlir.dialects._transform_tune_extension_ops_gen.tune_knob(result, name, options, *, selected=None, loc=None, ip=None) _ods_ir