diff --git a/ndsl/dsl/dace/stree/optimizations/axis_merge.py b/ndsl/dsl/dace/stree/optimizations/axis_merge.py index 27e3bc69..18142998 100644 --- a/ndsl/dsl/dace/stree/optimizations/axis_merge.py +++ b/ndsl/dsl/dace/stree/optimizations/axis_merge.py @@ -405,10 +405,12 @@ def visit_ScheduleTreeRoot(self, node: dst.ScheduleTreeRoot): Then exit. """ - # ndsl_log.debug(f"🧹 Normalizing {self.axis} loop symbol") + # TODO: many interval generate many iterator name right now + # e.g. _k_0, _k_1... + # This makes merging more difficult. We could write a pre-pass + # that cleans this up BUT we have an issue with the THIS_K feature + # in the tasklet... # NormalizeAxisSymbol(self.axis).visit(node) - # with open("stree-IN-sanitized.txt", "w") as f: - # f.write(node.as_string(-1)) overall_merged = 0 i = 0 @@ -422,7 +424,6 @@ def visit_ScheduleTreeRoot(self, node: dst.ScheduleTreeRoot): if __debug__: detect_cycle(node.children, set()) except RecursionError as re: - breakpoint() raise re # If we didn't merge, we revert the children diff --git a/ndsl/dsl/dace/stree/optimizations/memlet_helpers.py b/ndsl/dsl/dace/stree/optimizations/memlet_helpers.py index ecd138b4..1613e014 100644 --- a/ndsl/dsl/dace/stree/optimizations/memlet_helpers.py +++ b/ndsl/dsl/dace/stree/optimizations/memlet_helpers.py @@ -3,6 +3,8 @@ import dace.sdfg.analysis.schedule_tree.treenodes as dst from dace.memlet import Memlet +from ndsl import ndsl_log + class AxisIterator(Enum): _I = ("__i", 0) @@ -22,7 +24,7 @@ def no_data_dependencies_on_cartesian_axis( axis: AxisIterator, ) -> bool: """Check for read after write. Allow when indexation on the axis - is not offseted.""" + is not offset.""" write_collector = MemletCollector(collect_reads=False) write_collector.visit(first) @@ -39,7 +41,7 @@ def no_data_dependencies_on_cartesian_axis( for read in read_collector.in_memlets: if write.data == read.data: if previous_axis_index != read.subset[axis.as_cartesian_index()][0]: - print( + ndsl_log.debug( f"[{axis.name} Merge] Found read after write conflict " f"for {write.data} " f"w/ different offset to {axis.name} ("