From 946f812d59e2d7af6d83ba09c086127bf8d09153 Mon Sep 17 00:00:00 2001
From: Stephan Seitz <stephan.seitz@fau.de>
Date: Sun, 22 Sep 2019 00:33:22 +0200
Subject: [PATCH] Differentiate between llvm and llvm_gpu

---
 pystencils/llvm/kernelcreation.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pystencils/llvm/kernelcreation.py b/pystencils/llvm/kernelcreation.py
index 04e4292f..57e5b738 100644
--- a/pystencils/llvm/kernelcreation.py
+++ b/pystencils/llvm/kernelcreation.py
@@ -28,6 +28,7 @@ def create_kernel(assignments, function_name="kernel", type_info=None, split_gro
     if target == 'cpu':
         from pystencils.cpu import create_kernel
         code = create_kernel(assignments, function_name, type_info, split_groups, iteration_slice, ghost_layers)
+        code._backend = 'llvm'
     elif target == 'gpu':
         from pystencils.gpucuda.kernelcreation import create_cuda_kernel
         code = create_cuda_kernel(assignments,
@@ -35,10 +36,10 @@ def create_kernel(assignments, function_name="kernel", type_info=None, split_gro
                                   type_info,
                                   iteration_slice=iteration_slice,
                                   ghost_layers=ghost_layers)
+        code._backend = 'llvm_gpu'
     else:
         NotImplementedError()
     code.body = insert_casts(code.body)
     code._compile_function = make_python_function
-    code._backend = 'llvm'
 
     return code
-- 
GitLab