Skip to content
Snippets Groups Projects
Commit 2fa749d5 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Merge branch 'feature/allow-disabling-jacobian-vectorization' into 'master'

Add an option to allow turning off vectorization of jacobians

See merge request dominic/dune-perftool!249
parents 3ebcc845 d48f6900
No related branches found
No related tags found
No related merge requests found
...@@ -85,6 +85,7 @@ class PerftoolFormOptionsArray(ImmutableRecord): ...@@ -85,6 +85,7 @@ class PerftoolFormOptionsArray(ImmutableRecord):
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")
vectorization_allow_quadrature_changes = PerftoolOption(default=False, helpstr="whether the vectorization strategy is allowed to alter quadrature point numbers") vectorization_allow_quadrature_changes = PerftoolOption(default=False, helpstr="whether the vectorization strategy is allowed to alter quadrature point numbers")
vectorization_list_index = PerftoolOption(default=None, helpstr="Which vectorization to pick from a list (only valid with vectorization_strategy=fromlist).") vectorization_list_index = PerftoolOption(default=None, helpstr="Which vectorization to pick from a list (only valid with vectorization_strategy=fromlist).")
vectorization_jacobians = PerftoolOption(default=False, helpstr="Whether to attempt to vectorize jacobians (takes time, often not needed)")
simplify = PerftoolOption(default=False, helpstr="Whether to simplify expressions using sympy") simplify = PerftoolOption(default=False, helpstr="Whether to simplify expressions using sympy")
generate_jacobians = PerftoolOption(default=True, helpstr="Whether jacobian_* methods should be generated. This is set to false automatically, when numerical_jacobian is set to true.") generate_jacobians = PerftoolOption(default=True, helpstr="Whether jacobian_* methods should be generated. This is set to false automatically, when numerical_jacobian is set to true.")
generate_residuals = PerftoolOption(default=True, helpstr="Whether alpha_* methods should be generated.") generate_residuals = PerftoolOption(default=True, helpstr="Whether alpha_* methods should be generated.")
......
...@@ -151,7 +151,7 @@ def decide_vectorization_strategy(): ...@@ -151,7 +151,7 @@ def decide_vectorization_strategy():
active_sumfacts = [i for i in all_sumfacts if i.stage == 3 or i in basis_sumfacts] active_sumfacts = [i for i in all_sumfacts if i.stage == 3 or i in basis_sumfacts]
# If no vectorization is needed, abort now # If no vectorization is needed, abort now
if get_form_option("vectorization_strategy") == "none": if get_form_option("vectorization_strategy") == "none" or (get_global_context_value("form_type") == "jacobian" and not get_form_option("vectorization_jacobians")):
for sf in all_sumfacts: for sf in all_sumfacts:
_cache_vectorization_info(sf, sf.copy(buffer=get_counted_variable("buffer"))) _cache_vectorization_info(sf, sf.copy(buffer=get_counted_variable("buffer")))
return return
......
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