Skip to content
Snippets Groups Projects
Commit 946f812d authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Differentiate between llvm and llvm_gpu

parent b23348ce
Branches
Tags
No related merge requests found
...@@ -28,6 +28,7 @@ def create_kernel(assignments, function_name="kernel", type_info=None, split_gro ...@@ -28,6 +28,7 @@ def create_kernel(assignments, function_name="kernel", type_info=None, split_gro
if target == 'cpu': if target == 'cpu':
from pystencils.cpu import create_kernel from pystencils.cpu import create_kernel
code = create_kernel(assignments, function_name, type_info, split_groups, iteration_slice, ghost_layers) code = create_kernel(assignments, function_name, type_info, split_groups, iteration_slice, ghost_layers)
code._backend = 'llvm'
elif target == 'gpu': elif target == 'gpu':
from pystencils.gpucuda.kernelcreation import create_cuda_kernel from pystencils.gpucuda.kernelcreation import create_cuda_kernel
code = create_cuda_kernel(assignments, code = create_cuda_kernel(assignments,
...@@ -35,10 +36,10 @@ def create_kernel(assignments, function_name="kernel", type_info=None, split_gro ...@@ -35,10 +36,10 @@ def create_kernel(assignments, function_name="kernel", type_info=None, split_gro
type_info, type_info,
iteration_slice=iteration_slice, iteration_slice=iteration_slice,
ghost_layers=ghost_layers) ghost_layers=ghost_layers)
code._backend = 'llvm_gpu'
else: else:
NotImplementedError() NotImplementedError()
code.body = insert_casts(code.body) code.body = insert_casts(code.body)
code._compile_function = make_python_function code._compile_function = make_python_function
code._backend = 'llvm'
return code return code
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