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

fix gpu target detection again

parent 3058e2e0
1 merge request!172Draft: Changes for compatibility with pystencils 2.0
Pipeline #77946 passed with warnings with stages
in 48 minutes and 57 seconds
...@@ -47,10 +47,8 @@ class LatticeBoltzmannStep: ...@@ -47,10 +47,8 @@ class LatticeBoltzmannStep:
if config is not None: if config is not None:
if IS_PYSTENCILS_2: if IS_PYSTENCILS_2:
target = config.get_target() target = config.get_target()
is_gpu = target.is_gpu()
else: else:
target = config.target target = config.target
is_gpu = target == Target.GPU
else: else:
target = optimization.get('target', Target.CPU) target = optimization.get('target', Target.CPU)
...@@ -93,7 +91,11 @@ class LatticeBoltzmannStep: ...@@ -93,7 +91,11 @@ class LatticeBoltzmannStep:
self.density_data_name = name + "_density" if density_data_name is None else density_data_name self.density_data_name = name + "_density" if density_data_name is None else density_data_name
self.density_data_index = density_data_index self.density_data_index = density_data_index
self._gpu = is_gpu if IS_PYSTENCILS_2:
self._gpu = target.is_gpu()
else:
self._gpu = target == Target.GPU
layout = lbm_optimisation.field_layout layout = lbm_optimisation.field_layout
alignment = False alignment = False
......
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