Skip to content
Snippets Groups Projects
Commit 00e82268 authored by Frederik Hennig's avatar Frederik Hennig
Browse files

remove TODOs; fix vector CPU detection in lbstep

parent 5e0b30b4
No related branches found
No related tags found
1 merge request!172Draft: Changes for compatibility with pystencils 2.0
Pipeline #78273 passed
...@@ -575,11 +575,6 @@ def create_lb_ast(update_rule=None, lbm_config=None, lbm_optimisation=None, conf ...@@ -575,11 +575,6 @@ def create_lb_ast(update_rule=None, lbm_config=None, lbm_optimisation=None, conf
update_rule = create_lb_update_rule(lbm_config.collision_rule, lbm_config=lbm_config, update_rule = create_lb_update_rule(lbm_config.collision_rule, lbm_config=lbm_config,
lbm_optimisation=lbm_optimisation, config=config) lbm_optimisation=lbm_optimisation, config=config)
# field_types = set(fa.field.dtype for fa in update_rule.defined_symbols if isinstance(fa, Field.Access))
# TODO nbackend: Implicit type collation should not happen. Either all fields have the same type,
# or the user must explicitly include type casts where necessary.
# config = replace(config, data_type=collate_types(field_types), ghost_layers=1)
config = replace(config, ghost_layers=1) config = replace(config, ghost_layers=1)
ast = create_kernel(update_rule, config=config) ast = create_kernel(update_rule, config=config)
...@@ -607,7 +602,7 @@ def create_lb_update_rule(collision_rule=None, lbm_config=None, lbm_optimisation ...@@ -607,7 +602,7 @@ def create_lb_update_rule(collision_rule=None, lbm_config=None, lbm_optimisation
lb_method = collision_rule.method lb_method = collision_rule.method
if IS_PYSTENCILS_2: if IS_PYSTENCILS_2:
fallback_field_data_type = config.get_option("default_dtype") # TODO nbackend: clarify this fallback_field_data_type = config.get_option("default_dtype")
else: else:
fallback_field_data_type = config.data_type[lbm_config.field_name].numpy_dtype fallback_field_data_type = config.data_type[lbm_config.field_name].numpy_dtype
......
...@@ -101,8 +101,8 @@ class LatticeBoltzmannStep: ...@@ -101,8 +101,8 @@ class LatticeBoltzmannStep:
alignment = False alignment = False
if IS_PYSTENCILS_2: if IS_PYSTENCILS_2:
# TODO nbackend: get alignment if config.get_target().is_vector_cpu() and config.cpu.vectorize.enable:
pass alignment = alignment_if_vectorized
else: else:
if config.backend == Backend.C and config.cpu_vectorize_info: if config.backend == Backend.C and config.cpu_vectorize_info:
alignment = alignment_if_vectorized alignment = alignment_if_vectorized
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment