From df7f69df620fc5d26c0e7c4792375c2d48ac33b9 Mon Sep 17 00:00:00 2001 From: Stephan Seitz <stephan.seitz@fau.de> Date: Thu, 19 Dec 2019 13:18:32 +0100 Subject: [PATCH] Bug fix!!! --- pystencils/datahandling/graph_datahandling.py | 4 ++-- pystencils/kernelcreation.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pystencils/datahandling/graph_datahandling.py b/pystencils/datahandling/graph_datahandling.py index 650bf51f6..15027fa4c 100644 --- a/pystencils/datahandling/graph_datahandling.py +++ b/pystencils/datahandling/graph_datahandling.py @@ -7,13 +7,13 @@ """ """ - from enum import Enum import numpy as np import pystencils.datahandling import pystencils.kernel_wrapper +import pystencils.timeloop from pystencils.field import FieldType @@ -181,7 +181,7 @@ class GraphDataHandling(pystencils.datahandling.SerialDataHandling): def synchronization_function(self, names, stencil=None, target=None, **_): for name in names: - gpu = target == 'cpu' + gpu = target == 'gpu' self.call_queue.append(Communication(self._fields[name], stencil, gpu)) super().synchronization_function(names, stencil=None, target=None, **_) diff --git a/pystencils/kernelcreation.py b/pystencils/kernelcreation.py index 613050544..298d01255 100644 --- a/pystencils/kernelcreation.py +++ b/pystencils/kernelcreation.py @@ -76,9 +76,9 @@ def create_kernel(assignments, [0., 4., 4., 4., 0.], [0., 0., 0., 0., 0.]]) """ - #save the original assignments + # save the original assignments assign = assignments - + # ---- Normalizing parameters split_groups = () if isinstance(assignments, AssignmentCollection): @@ -187,7 +187,7 @@ def create_indexed_kernel(assignments, """ assign = assignments indF = index_fields - + if isinstance(assignments, Assignment): assignments = [assignments] elif isinstance(assignments, AssignmentCollection): -- GitLab