Skip to content
Snippets Groups Projects
Commit 15fea042 authored by Markus Holzer's avatar Markus Holzer
Browse files

Added error message

parent 24193b84
No related branches found
No related tags found
1 merge request!351[FIX] Alignement detection
...@@ -178,6 +178,11 @@ def vectorize_inner_loops_and_adapt_load_stores(ast_node, assume_aligned, nontem ...@@ -178,6 +178,11 @@ def vectorize_inner_loops_and_adapt_load_stores(ast_node, assume_aligned, nontem
for indexed in loop_node.atoms(sp.Indexed): for indexed in loop_node.atoms(sp.Indexed):
base, index = indexed.args base, index = indexed.args
if loop_counter_symbol in index.atoms(sp.Symbol): if loop_counter_symbol in index.atoms(sp.Symbol):
if not isinstance(vector_width, int):
error_message = "NotImplemented: For instruction sets with variable vector size the aligned and " \
"unaligned load and strore instructions must match."
assert ast_node.instruction_set['loadA'] == ast_node.instruction_set['loadU'], error_message
assert ast_node.instruction_set['storeU'] == ast_node.instruction_set['storeA'], error_message
loop_counter_is_offset = loop_counter_symbol not in (index - loop_counter_symbol).atoms() loop_counter_is_offset = loop_counter_symbol not in (index - loop_counter_symbol).atoms()
aligned_access = (index - loop_counter_symbol).subs(zero_loop_counters) % vector_width == 0 aligned_access = (index - loop_counter_symbol).subs(zero_loop_counters) % vector_width == 0
stride = sp.simplify(index.subs({loop_counter_symbol: loop_counter_symbol + 1}) - index) stride = sp.simplify(index.subs({loop_counter_symbol: loop_counter_symbol + 1}) - index)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment