From ebbca4c528a6e1555c007391dfc7fc0f231cc920 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 18 Aug 2016 19:31:40 -0500 Subject: [PATCH] Make bostable_into opt_in [ci skip] --- loopy/options.py | 5 +++++ loopy/preprocess.py | 5 +++-- loopy/schedule/__init__.py | 9 +++++++-- loopy/version.py | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/loopy/options.py b/loopy/options.py index 129032a73..dae675a48 100644 --- a/loopy/options.py +++ b/loopy/options.py @@ -139,6 +139,9 @@ class Options(Record): edit_cl=False, cl_build_options=[], allow_terminal_colors=None, disable_global_barriers=False, + + # intentionally undocumented + enable_boostable=False, ): if allow_terminal_colors is None: @@ -163,6 +166,8 @@ class Options(Record): edit_cl=edit_cl, cl_build_options=cl_build_options, allow_terminal_colors=allow_terminal_colors, disable_global_barriers=disable_global_barriers, + + enable_boostable=enable_boostable, ) def update(self, other): diff --git a/loopy/preprocess.py b/loopy/preprocess.py index bdb91d01d..b1c69e883 100644 --- a/loopy/preprocess.py +++ b/loopy/preprocess.py @@ -1123,8 +1123,9 @@ def preprocess_kernel(kernel, device=None): kernel = find_temporary_scope(kernel) # boostability should be removed in 2017.x. - kernel = find_idempotence(kernel) - kernel = limit_boostability(kernel) + if kernel.options.enable_boostable: + kernel = find_idempotence(kernel) + kernel = limit_boostability(kernel) kernel = kernel.target.preprocess(kernel) diff --git a/loopy/schedule/__init__.py b/loopy/schedule/__init__.py index 04882334f..bbf5039ca 100644 --- a/loopy/schedule/__init__.py +++ b/loopy/schedule/__init__.py @@ -909,7 +909,9 @@ def generate_loop_schedules_internal( for insn_id in reachable_insn_ids: insn = kernel.id_to_insn[insn_id] - want = kernel.insn_inames(insn) | insn.boostable_into + want = kernel.insn_inames(insn) + if kernel.options.enable_boostable: + want = want | insn.boostable_into if hypothetically_active_loops <= want: if usefulness is None: @@ -1031,7 +1033,10 @@ def generate_loop_schedules_internal( yield sched_state.schedule else: - if not allow_boost and allow_boost is not None: + if ( + kernel.options.enable_boostable + and not allow_boost + and allow_boost is not None): # try again with boosting allowed for sub_sched in generate_loop_schedules_internal( sched_state, diff --git a/loopy/version.py b/loopy/version.py index 12b2fedbe..76d130f87 100644 --- a/loopy/version.py +++ b/loopy/version.py @@ -32,4 +32,4 @@ except ImportError: else: _islpy_version = islpy.version.VERSION_TEXT -DATA_MODEL_VERSION = "v42-islpy%s" % _islpy_version +DATA_MODEL_VERSION = "v43-islpy%s" % _islpy_version -- GitLab