diff --git a/loopy/options.py b/loopy/options.py index 129032a731badb8ded65ffa1d894ab3c1a82bc16..dae675a48025bf5fbff405df7777002c53758f3b 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 bdb91d01d7988c1bf5517f699664e0090f97cd34..b1c69e883cdc4e63b9c9cda266f264d7e94c1cb4 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 04882334f7c5ce9337a690277b16e258eac5327b..bbf5039ca5b3533fec382cd2123a0bb71666f7bc 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 12b2fedbec2669205de2a82a8d5eca42678e9353..76d130f87c459f3dd7bf4b26705f12b69c1924ca 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