Skip to content
Snippets Groups Projects
Commit 0fe7727d authored by Michael Kuron's avatar Michael Kuron :mortar_board:
Browse files

Disallow OpenMP + blocking + cacheline-zero

parent e9bd89c8
1 merge request!242Disallow OpenMP + blocking + cacheline-zero
Pipeline #31784 passed with stage
in 8 minutes and 40 seconds
...@@ -107,6 +107,12 @@ def create_kernel(assignments, ...@@ -107,6 +107,12 @@ def create_kernel(assignments,
vectorize(ast) vectorize(ast)
elif isinstance(cpu_vectorize_info, dict): elif isinstance(cpu_vectorize_info, dict):
vectorize(ast, **cpu_vectorize_info) vectorize(ast, **cpu_vectorize_info)
if cpu_openmp and cpu_blocking and 'nontemporal' in cpu_vectorize_info and \
cpu_vectorize_info['nontemporal'] and 'cachelineZero' in ast.instruction_set:
# This condition is stricter than it needs to be: if blocks along the fastest axis start on a
# cache line boundary, it's okay. But we cannot determine that here.
# We don't need to disallow OpenMP collapsing because it is never applied to the inner loop.
raise ValueError("Blocking cannot be combined with cacheline-zeroing")
else: else:
raise ValueError("Invalid value for cpu_vectorize_info") raise ValueError("Invalid value for cpu_vectorize_info")
elif target == 'llvm': elif target == 'llvm':
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment