Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jonas Plewinski
pystencils
Commits
946f812d
Commit
946f812d
authored
Sep 22, 2019
by
Stephan Seitz
Browse files
Differentiate between llvm and llvm_gpu
parent
b23348ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
pystencils/llvm/kernelcreation.py
View file @
946f812d
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment