31 other.options.ptr =
nullptr;
47 nb::class_<PyTransformOptions>(m,
"TransformOptions")
51 [](
const PyTransformOptions &self) {
54 [](PyTransformOptions &self,
bool value) {
58 "enforce_single_top_level_transform_op",
59 [](
const PyTransformOptions &self) {
63 [](PyTransformOptions &self,
bool value) {
69 "apply_named_sequence",
82 "Diagnostic generated while applying "
83 "transform.named_sequence:\n%s",
89 throw nb::value_error(
90 (
"Failed to apply named transform sequence.\nDiagnostic message " +
94 nb::arg(
"payload_root"), nb::arg(
"transform_root"),
95 nb::arg(
"transform_module"),
96 nb::arg(
"transform_options") = PyTransformOptions());
99 "copy_symbols_and_merge_into",
107 throw nb::value_error(
108 (
"Failed to merge symbols.\nDiagnostic message " +
113 nb::arg(
"target"), nb::arg(
"other"));
117 m.doc() =
"MLIR Transform dialect interpreter functionality.";
MlirContext mlirOperationGetContext(MlirOperation op)
MLIR_CAPI_EXPORTED MlirLogicalResult mlirTransformApplyNamedSequence(MlirOperation payload, MlirOperation transformRoot, MlirOperation transformModule, MlirTransformOptions transformOptions)
Applies the transformation script starting at the given transform root operation to the given payload...
MLIR_CAPI_EXPORTED bool mlirTransformOptionsGetEnforceSingleTopLevelTransformOp(MlirTransformOptions transformOptions)
Returns true if the enforcement of the top-level transform op being single is enabled in transform op...
MLIR_CAPI_EXPORTED void mlirTransformOptionsEnableExpensiveChecks(MlirTransformOptions transformOptions, bool enable)
Enables or disables expensive checks in transform options.
MLIR_CAPI_EXPORTED void mlirTransformOptionsDestroy(MlirTransformOptions transformOptions)
Destroys a transform options object previously created by mlirTransformOptionsCreate.
MLIR_CAPI_EXPORTED void mlirTransformOptionsEnforceSingleTopLevelTransformOp(MlirTransformOptions transformOptions, bool enable)
Enables or disables the enforcement of the top-level transform op being single in transform options.
MLIR_CAPI_EXPORTED MlirTransformOptions mlirTransformOptionsCreate(void)
Creates a default-initialized transform options object.
MLIR_CAPI_EXPORTED MlirLogicalResult mlirMergeSymbolsIntoFromClone(MlirOperation target, MlirOperation other)
Merge the symbols from other into target, potentially renaming them to avoid conflicts.
MLIR_CAPI_EXPORTED bool mlirTransformOptionsGetExpensiveChecksEnabled(MlirTransformOptions transformOptions)
Returns true if expensive checks are enabled in transform options.
static llvm::ManagedStatic< PassManagerOptions > options
RAII scope intercepting all diagnostics into a string.
std::string takeMessage()
Base class for PyOperation and PyOpView which exposes the primary, user visible methods for manipulat...
virtual PyOperation & getOperation()=0
Each must provide access to the raw Operation.
static bool mlirLogicalResultIsSuccess(MlirLogicalResult res)
Checks if the given logical result represents a success.
static bool mlirLogicalResultIsFailure(MlirLogicalResult res)
Checks if the given logical result represents a failure.
Include the generated interface declarations.
A logical result value, essentially a boolean with named states.
MlirTransformOptions options
PyTransformOptions(PyTransformOptions &&other)
PyTransformOptions(const PyTransformOptions &)=delete