diff --git a/loopy/statistics.py b/loopy/statistics.py index 5e929b61830ef3dc286728ee63a659a0b16d19c3..7e74ab0a101a96b936b5ac8c0dcd8786e4df4be4 100755 --- a/loopy/statistics.py +++ b/loopy/statistics.py @@ -1286,6 +1286,10 @@ def get_op_map(knl, numpy_types=True, count_redundant_work=False, """ + if not knl.options.ignore_boostable_into: + raise LoopyError("Kernel '%s': Using operation counting requires the option " + "ignore_boostable_into to be set." % knl.name) + from loopy.preprocess import preprocess_kernel, infer_unknown_types from loopy.kernel.instruction import ( CallInstruction, CInstruction, Assignment, @@ -1424,6 +1428,10 @@ def get_mem_access_map(knl, numpy_types=True, count_redundant_work=False, """ from loopy.preprocess import preprocess_kernel, infer_unknown_types + if not knl.options.ignore_boostable_into: + raise LoopyError("Kernel '%s': Using operation counting requires the option " + "ignore_boostable_into to be set." % knl.name) + if not isinstance(subgroup_size, int): # try to find subgroup_size subgroup_size_guess = _find_subgroup_size_for_knl(knl) @@ -1615,6 +1623,10 @@ def get_synchronization_map(knl, subgroup_size=None): """ + if not knl.options.ignore_boostable_into: + raise LoopyError("Kernel '%s': Using operation counting requires the option " + "ignore_boostable_into to be set." % knl.name) + from loopy.preprocess import preprocess_kernel, infer_unknown_types from loopy.schedule import (EnterLoop, LeaveLoop, Barrier, CallKernel, ReturnFromKernel, RunInstruction)