File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from .builders import create_schedule
22from .builders import create_named_sequence
3- from .common import hoist_loops
3+ from .hoisting import hoist_loops
44from .linalg import linalg_to_generic
55from .linalg import linalg_to_category
66from .linalg import linalg_to_named
File renamed without changes.
Original file line number Diff line number Diff line change 1- from .common import cleanup
2- from .common import loop_hoisting
3- from .common import match_op
1+ from .cleanup import cleanup
2+ from .hoisting import loop_hoisting
3+ from .matchers import match_op
44from .linalg import linalg_morph_ops
55from .tiling import tile_ops
66from .packing import block_pack_matmuls
Original file line number Diff line number Diff line change 1+ from mlir import ir
2+ from mlir .dialects import transform
3+
4+
5+ def cleanup (target ):
6+ """
7+ Apply canonicalization patterns.
8+
9+ Args:
10+ target: Handle to target
11+ """
12+ transform .apply_cse (target )
13+ with ir .InsertionPoint (transform .ApplyPatternsOp (target ).patterns ):
14+ transform .apply_patterns_canonicalization ()
Original file line number Diff line number Diff line change 1+ from mlir .dialects import transform
2+ from mlir .dialects .transform import loop
3+
4+
5+ def loop_hoisting (target ):
6+ """
7+ Apply loop hoisting.
8+
9+ Args:
10+ target: Handle to target
11+ """
12+ transform .apply_licm (target )
13+ loop .loop_hoist_loop_invariant_subsets (target )
Original file line number Diff line number Diff line change 11from mlir import ir
22from mlir .dialects import transform
3- from mlir .dialects .transform import loop
43from mlir .dialects .transform import structured
54
65
@@ -26,26 +25,3 @@ def match_op(
2625 if isinstance (target_op , str ):
2726 target_op = [target_op ]
2827 return structured .MatchOp .match_op_names (target , target_op )
29-
30-
31- def cleanup (target ):
32- """
33- Apply canonicalization patterns.
34-
35- Args:
36- target: Handle to target
37- """
38- transform .apply_cse (target )
39- with ir .InsertionPoint (transform .ApplyPatternsOp (target ).patterns ):
40- transform .apply_patterns_canonicalization ()
41-
42-
43- def loop_hoisting (target ):
44- """
45- Apply loop hoisting.
46-
47- Args:
48- target: Handle to target
49- """
50- transform .apply_licm (target )
51- loop .loop_hoist_loop_invariant_subsets (target )
You can’t perform that action at this time.
0 commit comments