From dfecf6a789b1bb6a605908dedb2f5177ec94d5d2 Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Wed, 5 Oct 2016 13:51:04 +0200 Subject: [PATCH 1/3] Introduce kernel option to ignore boostable_into field in iname duplication --- loopy/options.py | 8 ++++++++ loopy/transform/iname.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/loopy/options.py b/loopy/options.py index b4af23c7c..1564958e0 100644 --- a/loopy/options.py +++ b/loopy/options.py @@ -56,6 +56,12 @@ class Options(Record): Like :attr:`trace_assignments`, but also trace the assigned values. + .. attribute:: ignore_boostable_into_field + + Ignore the boostable_into field of the kernel, when + determining whether an iname duplication is necessary + for the kernel to be schedulable. + .. rubric:: Invocation-related options .. attribute:: skip_arg_checks @@ -132,6 +138,7 @@ class Options(Record): annotate_inames=False, trace_assignments=False, trace_assignment_values=False, + ignore_boostable_into_field=False, skip_arg_checks=False, no_numpy=False, return_dict=False, write_wrapper=False, highlight_wrapper=False, @@ -155,6 +162,7 @@ class Options(Record): annotate_inames=annotate_inames, trace_assignments=trace_assignments, trace_assignment_values=trace_assignment_values, + ignore_boostable_into_field=ignore_boostable_into_field, skip_arg_checks=skip_arg_checks, no_numpy=no_numpy, return_dict=return_dict, diff --git a/loopy/transform/iname.py b/loopy/transform/iname.py index 1914b8d67..08c239b0d 100644 --- a/loopy/transform/iname.py +++ b/loopy/transform/iname.py @@ -956,7 +956,7 @@ def get_iname_duplication_options(knl, use_boostable_into=False): # If we find a duplication option and fo not use boostable_into # information, we restart this generator with use_boostable_into=True - if not use_boostable_into: + if not use_boostable_into and not knl.options.ignore_boostable_into_field: for option in get_iname_duplication_options(knl, True): yield option -- GitLab From 515f1ed8bd76202a035f9f7052f91bbdea8d6ab1 Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Wed, 12 Oct 2016 11:26:04 +0200 Subject: [PATCH 2/3] ignore_boostable_into_field -> ignore_boostable_into as talked about. --- loopy/options.py | 6 +++--- loopy/transform/iname.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/loopy/options.py b/loopy/options.py index 1564958e0..5db1be646 100644 --- a/loopy/options.py +++ b/loopy/options.py @@ -56,7 +56,7 @@ class Options(Record): Like :attr:`trace_assignments`, but also trace the assigned values. - .. attribute:: ignore_boostable_into_field + .. attribute:: ignore_boostable_into Ignore the boostable_into field of the kernel, when determining whether an iname duplication is necessary @@ -138,7 +138,7 @@ class Options(Record): annotate_inames=False, trace_assignments=False, trace_assignment_values=False, - ignore_boostable_into_field=False, + ignore_boostable_into=False, skip_arg_checks=False, no_numpy=False, return_dict=False, write_wrapper=False, highlight_wrapper=False, @@ -162,7 +162,7 @@ class Options(Record): annotate_inames=annotate_inames, trace_assignments=trace_assignments, trace_assignment_values=trace_assignment_values, - ignore_boostable_into_field=ignore_boostable_into_field, + ignore_boostable_into=ignore_boostable_into, skip_arg_checks=skip_arg_checks, no_numpy=no_numpy, return_dict=return_dict, diff --git a/loopy/transform/iname.py b/loopy/transform/iname.py index 08c239b0d..46d375cce 100644 --- a/loopy/transform/iname.py +++ b/loopy/transform/iname.py @@ -956,7 +956,7 @@ def get_iname_duplication_options(knl, use_boostable_into=False): # If we find a duplication option and fo not use boostable_into # information, we restart this generator with use_boostable_into=True - if not use_boostable_into and not knl.options.ignore_boostable_into_field: + if not use_boostable_into and not knl.options.ignore_boostable_into: for option in get_iname_duplication_options(knl, True): yield option -- GitLab From c86a05b26e47e1cf66fb0eae798cf084e2114ed7 Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Wed, 12 Oct 2016 11:44:45 +0200 Subject: [PATCH 3/3] Also use ignore_boostable_into in the scheduler --- loopy/schedule/__init__.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/loopy/schedule/__init__.py b/loopy/schedule/__init__.py index 04882334f..6faa78dca 100644 --- a/loopy/schedule/__init__.py +++ b/loopy/schedule/__init__.py @@ -1469,11 +1469,14 @@ def generate_loop_schedules(kernel, debug_args={}): uses_of_boostability=[]) - generators = [ - generate_loop_schedules_internal(sched_state, - debug=debug, allow_boost=None), - generate_loop_schedules_internal(sched_state, - debug=debug)] + generators = [] + + if not kernel.options.ignore_boostable_into: + generators.append(generate_loop_schedules_internal(sched_state, + debug=debug, allow_boost=None)) + + generators.append(generate_loop_schedules_internal(sched_state, + debug=debug)) def print_longest_dead_end(): if debug.interactive: -- GitLab