From e00897a6b1e4085bf62d6aaf6e8f8c871b0b6a5f 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 07:02:31 +0200
Subject: [PATCH] [skip ci] Add logging to autotuning

---
 python/dune/codegen/sumfact/autotune.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/python/dune/codegen/sumfact/autotune.py b/python/dune/codegen/sumfact/autotune.py
index 5cc2178c..e73fd81a 100644
--- a/python/dune/codegen/sumfact/autotune.py
+++ b/python/dune/codegen/sumfact/autotune.py
@@ -5,6 +5,7 @@ import re
 import subprocess
 import filelock
 import hashlib
+import logging
 import json
 from operator import mul
 from six.moves import reduce
@@ -435,6 +436,8 @@ def autotune_realization(sf=None, kernel=None, signature=None, transformations=N
         assert kernel is None
         assert signature is None
 
+    logger = logging.getLogger(__name__)
+
     # Make sure that the benchmark directory exists
     dir = os.path.join(get_option("project_basedir"), "autotune-benchmarks")
     if not os.path.exists(dir):
@@ -454,14 +457,14 @@ def autotune_realization(sf=None, kernel=None, signature=None, transformations=N
     lock = os.path.join(dir, "{}.lock".format(basename))
     executable = os.path.join(dir, basename)
 
-    print("palpo filename: {}".format(filename))
-
     # Generate and compile a benchmark program
     #
     # Note: cache restoring is only necessary when generating from SumfactKernel
     with cache_restoring():
         with filelock.FileLock(lock):
             if not os.path.isfile(logname):
+                logger.debug('Generate autotune target in file {}'.format(filename))
+
                 if sf is None:
                     generate_standalone_kernel_code(kernel, signature, filename, transformations)
                 elif get_option("autotune_google_benchmark"):
-- 
GitLab