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

[skip ci] Remove Opcounter from signature for autotuning

parent 0b505d91
No related branches found
No related tags found
No related merge requests found
...@@ -311,6 +311,13 @@ def generate_standalone_kernel_code(kernel, signature, filename, transformations ...@@ -311,6 +311,13 @@ def generate_standalone_kernel_code(kernel, signature, filename, transformations
opcounting = get_option("opcounter") opcounting = get_option("opcounter")
set_option("opcounter", False) set_option("opcounter", False)
# Remove opcounter from signature
p = re.compile('OpCounter::OpCounter<([^>]*)>')
assert len(signature) == 1
sig = signature[0]
sig = p.sub(r'\1', sig)
assert 'OpCounter' not in signature
with open(filename, 'w') as f: with open(filename, 'w') as f:
if transformations: if transformations:
f.write('// Transformations:\n') f.write('// Transformations:\n')
...@@ -330,8 +337,6 @@ def generate_standalone_kernel_code(kernel, signature, filename, transformations ...@@ -330,8 +337,6 @@ def generate_standalone_kernel_code(kernel, signature, filename, transformations
f.write("\n".join(headers)) f.write("\n".join(headers))
# Get a list of the function argument names # Get a list of the function argument names
assert len(signature) == 1
sig = signature[0]
arguments = sig[sig.find('(') + 1:sig.find(')')].split(',') arguments = sig[sig.find('(') + 1:sig.find(')')].split(',')
arguments = [a.split(' ')[-1] for a in arguments] arguments = [a.split(' ')[-1] for a in arguments]
...@@ -425,7 +430,6 @@ def generate_standalone_kernel_code(kernel, signature, filename, transformations ...@@ -425,7 +430,6 @@ def generate_standalone_kernel_code(kernel, signature, filename, transformations
set_option("opcounter", opcounting) set_option("opcounter", opcounting)
def autotune_realization(sf=None, kernel=None, signature=None, transformations=None): def autotune_realization(sf=None, kernel=None, signature=None, transformations=None):
"""Generate an microbenchmark, compile run and return time """Generate an microbenchmark, compile run and return time
......
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