Skip to content
Snippets Groups Projects
Commit f0c48b5b authored by René Heß's avatar René Heß Committed by Dominic Kempf
Browse files

Add option to throw error if program was not fully vectorized

parent e26918a1
No related branches found
No related tags found
No related merge requests found
...@@ -80,6 +80,7 @@ class PerftoolFormOptionsArray(ImmutableRecord): ...@@ -80,6 +80,7 @@ class PerftoolFormOptionsArray(ImmutableRecord):
sumfact = PerftoolOption(default=False, helpstr="Use sumfactorization") sumfact = PerftoolOption(default=False, helpstr="Use sumfactorization")
vectorization_quadloop = PerftoolOption(default=False, helpstr="whether to generate code with explicit vectorization") vectorization_quadloop = PerftoolOption(default=False, helpstr="whether to generate code with explicit vectorization")
vectorization_strategy = PerftoolOption(default="none", helpstr="The identifier of the vectorization cost model. Possible values: none|explicit|model") vectorization_strategy = PerftoolOption(default="none", helpstr="The identifier of the vectorization cost model. Possible values: none|explicit|model")
vectorization_not_fully_vectorized_error = PerftoolOption(default=False, helpstr="throw an error if nonquadloop vectorization did not fully vectorize")
vectorization_horizontal = PerftoolOption(default=None, helpstr="an explicit value for horizontal vectorization read by the 'explicit' strategy") vectorization_horizontal = PerftoolOption(default=None, helpstr="an explicit value for horizontal vectorization read by the 'explicit' strategy")
vectorization_vertical = PerftoolOption(default=None, helpstr="an explicit value for vertical vectorization read by the 'explicit' strategy") vectorization_vertical = PerftoolOption(default=None, helpstr="an explicit value for vertical vectorization read by the 'explicit' strategy")
vectorization_padding = PerftoolOption(default=None, helpstr="an explicit value for the allowed padding in vectorization") vectorization_padding = PerftoolOption(default=None, helpstr="an explicit value for the allowed padding in vectorization")
......
...@@ -32,6 +32,9 @@ import math ...@@ -32,6 +32,9 @@ import math
@generator_factory(item_tags=("vecinfo", "dryrundata"), cache_key_generator=lambda o, n: o) @generator_factory(item_tags=("vecinfo", "dryrundata"), cache_key_generator=lambda o, n: o)
def _cache_vectorization_info(old, new): def _cache_vectorization_info(old, new):
if get_form_option("vectorization_not_fully_vectorized_error"):
if not isinstance(new, VectorizedSumfactKernel):
raise PerftoolVectorizationError("Did not fully vectorize!")
if new is None: if new is None:
raise PerftoolVectorizationError("Vectorization info for sum factorization kernel was not gathered correctly!") raise PerftoolVectorizationError("Vectorization info for sum factorization kernel was not gathered correctly!")
return new return new
......
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