From 0b505d915ca50db47b6e2a365fbf84811b8751bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20He=C3=9F?= <rene.hess@iwr.uni-heidelberg.de> Date: Tue, 16 Apr 2019 13:30:48 +0200 Subject: [PATCH] [skip ci] Turn off opcounting for autotune generation --- python/dune/codegen/sumfact/autotune.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/dune/codegen/sumfact/autotune.py b/python/dune/codegen/sumfact/autotune.py index e73fd81a..c77d8f0e 100644 --- a/python/dune/codegen/sumfact/autotune.py +++ b/python/dune/codegen/sumfact/autotune.py @@ -307,6 +307,10 @@ def generate_standalone_code(sf, filename): def generate_standalone_kernel_code(kernel, signature, filename, transformations=None): + # Turn off opcounting + opcounting = get_option("opcounter") + set_option("opcounter", False) + with open(filename, 'w') as f: if transformations: f.write('// Transformations:\n') @@ -417,6 +421,10 @@ def generate_standalone_kernel_code(kernel, signature, filename, transformations 'BENCHMARK_MAIN();'] f.write('\n'.join(main)) + # Maybe turn opcounting on again + set_option("opcounter", opcounting) + + def autotune_realization(sf=None, kernel=None, signature=None, transformations=None): """Generate an microbenchmark, compile run and return time -- GitLab