Skip to content
Snippets Groups Projects
Commit 430c5187 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Make auto_test more flexible regarding not running the ref check

parent 45f08ed9
No related branches found
No related tags found
Loading
...@@ -350,7 +350,7 @@ def _enumerate_cl_devices_for_ref_test(): ...@@ -350,7 +350,7 @@ def _enumerate_cl_devices_for_ref_test():
# {{{ main automatic testing entrypoint # {{{ main automatic testing entrypoint
def auto_test_vs_ref( def auto_test_vs_ref(
ref_knl, ctx, test_knl, op_count=[], op_label=[], parameters={}, ref_knl, ctx, test_knl=None, op_count=[], op_label=[], parameters={},
print_ref_code=False, print_code=True, warmup_rounds=2, print_ref_code=False, print_code=True, warmup_rounds=2,
dump_binary=False, dump_binary=False,
fills_entire_output=None, do_check=True, check_result=None, fills_entire_output=None, do_check=True, check_result=None,
...@@ -367,6 +367,10 @@ def auto_test_vs_ref( ...@@ -367,6 +367,10 @@ def auto_test_vs_ref(
import pyopencl as cl import pyopencl as cl
if test_knl is None:
test_knl = ref_knl
do_check = False
if len(ref_knl.args) != len(test_knl.args): if len(ref_knl.args) != len(test_knl.args):
raise LoopyError("ref_knl and test_knl do not have the same number " raise LoopyError("ref_knl and test_knl do not have the same number "
"of arguments") "of arguments")
...@@ -647,8 +651,10 @@ def auto_test_vs_ref( ...@@ -647,8 +651,10 @@ def auto_test_vs_ref(
result_dict["elapsed_event_marker"] = elapsed_event_marker result_dict["elapsed_event_marker"] = elapsed_event_marker
result_dict["elapsed_wall"] = elapsed_wall result_dict["elapsed_wall"] = elapsed_wall
result_dict["timing_rounds"] = timing_rounds result_dict["timing_rounds"] = timing_rounds
result_dict["ref_elapsed_event"] = ref_elapsed_event
result_dict["ref_elapsed_wall"] = ref_elapsed_wall if do_check:
result_dict["ref_elapsed_event"] = ref_elapsed_event
result_dict["ref_elapsed_wall"] = ref_elapsed_wall
return result_dict return result_dict
......
...@@ -343,8 +343,6 @@ class DifferentiationContext(object): ...@@ -343,8 +343,6 @@ class DifferentiationContext(object):
return new_var_name return new_var_name
# }}}
# }}} # }}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment