Skip to content
Snippets Groups Projects
Commit e00897a6 authored by René Heß's avatar René Heß
Browse files

[skip ci] Add logging to autotuning

parent 33d9074b
No related branches found
No related tags found
No related merge requests found
......@@ -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"):
......
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