Oleksandr "Alex" Zinenko 619ee20b39
[mlir] add an example of using transform dialect standalone (#82623)
Transform dialect interpreter is designed to be usable outside of the
pass pipeline, as the main program transformation driver, e.g., for
languages with explicit schedules. Provide an example of such usage with
a couple of tests.
2024-02-28 09:48:15 +01:00

19 lines
788 B
MLIR

// This test just needs to parse. Note that the diagnostic message below will
// be produced in *another* multi-file test, do *not* -verify-diagnostics here.
// RUN: mlir-opt %s
// RUN: mlir-transform-opt %s --transform-library=%p/external-def.mlir | FileCheck %s
module attributes {transform.with_named_sequence} {
// The definition should not be printed here.
// CHECK: @external_def
// CHECK-NOT: transform.print
transform.named_sequence private @external_def(%root: !transform.any_op {transform.readonly})
transform.named_sequence private @__transform_main(%root: !transform.any_op) {
// expected-error @below {{unresolved external named sequence}}
transform.include @external_def failures(propagate) (%root) : (!transform.any_op) -> ()
transform.yield
}
}