From 24744208e8dc25ce4d36b7c6bcc1e9706afc670f Mon Sep 17 00:00:00 2001
From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de>
Date: Thu, 4 Oct 2018 14:56:08 +0200
Subject: [PATCH] Correct opcounting benchmark generation

---
 python/dune/perftool/loopy/target.py     | 1 -
 python/dune/perftool/sumfact/autotune.py | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/python/dune/perftool/loopy/target.py b/python/dune/perftool/loopy/target.py
index cc21196f..9c551db9 100644
--- a/python/dune/perftool/loopy/target.py
+++ b/python/dune/perftool/loopy/target.py
@@ -44,7 +44,6 @@ def dtype_floatingpoint():
         raise NotImplementedError("{}bit floating point type".format(bits))
 
 
-@pt.memoize
 def numpy_to_cpp_dtype(key):
     _registry = {'float32': 'float',
                  'int32': 'int',
diff --git a/python/dune/perftool/sumfact/autotune.py b/python/dune/perftool/sumfact/autotune.py
index d9416e84..3e8eef5f 100644
--- a/python/dune/perftool/sumfact/autotune.py
+++ b/python/dune/perftool/sumfact/autotune.py
@@ -88,7 +88,6 @@ def generate_standalone_code(sf, filename, logname):
         set_option("opcounter", False)
         from dune.perftool.loopy.target import type_floatingpoint
         real = type_floatingpoint()
-        set_option("opcounter", opcounting)
         f.write("  using RF = {};\n".format(real))
         f.write("  using DF = {};\n".format(real))
 
@@ -182,6 +181,7 @@ def generate_standalone_code(sf, filename, logname):
                       "  std::cout << accum;\n",
                       "}\n",
                       ])
+        set_option("opcounter", opcounting)
 
 
 def autotune_realization(sf):
-- 
GitLab