From 4063c317bee17b1c9506afd963c4cd1e69889f2a Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Sat, 15 Jul 2017 20:57:35 -0500 Subject: [PATCH 1/2] Scheduler: Remove a heuristic intended to force inames to be scheduled inside a subkernel. I'm not sure this heuristic is correct, because it means that newly scheduled inames will always be scheduled inside a subkernel. --- loopy/schedule/__init__.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/loopy/schedule/__init__.py b/loopy/schedule/__init__.py index 57cf74b80..0fa2c8ed5 100644 --- a/loopy/schedule/__init__.py +++ b/loopy/schedule/__init__.py @@ -1073,28 +1073,6 @@ def generate_loop_schedules_internal( % iname) continue - if ( - not sched_state.within_subkernel - and iname not in sched_state.prescheduled_inames): - # Avoid messing up some orderings such as picking: - # - # EnterLoop(temporary.reload) - # CallKernel - # ... - # - # instead of - # - # CallKernel - # EnterLoop(temporary.reload) - # ... - # - # This serves a heuristic to catch some bad decisions early, the - # scheduler will not allow the first variant regardless. - if debug_mode: - print("scheduling '%s' prohibited because we are outside " - "a subkernel" % iname) - continue - currently_accessible_inames = ( active_inames_set | sched_state.parallel_inames) if ( -- GitLab From 744da0d8d3cec6216ebf22ac3b04c101ef9846cd Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Sat, 15 Jul 2017 21:20:16 -0500 Subject: [PATCH 2/2] Update description of preschedule to clarify that items in the preschedule may be interleaved with items not in the preschedule. --- loopy/schedule/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/loopy/schedule/__init__.py b/loopy/schedule/__init__.py index 0fa2c8ed5..e05140ff5 100644 --- a/loopy/schedule/__init__.py +++ b/loopy/schedule/__init__.py @@ -596,7 +596,8 @@ class SchedulerState(ImmutableRecord): .. attribute:: preschedule A sequence of schedule items that must be inserted into the - schedule, maintaining the same ordering + schedule, maintaining the same relative ordering. Newly scheduled + items may interleave this sequence. .. attribute:: prescheduled_insn_ids -- GitLab