Commit 0fe7727d authored by Michael Kuron's avatar Michael Kuron
Browse files

Disallow OpenMP + blocking + cacheline-zero

parent e9bd89c8
...@@ -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':
......
Markdown is supported
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