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