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
Markus Holzer
pystencils
Commits
494cfe09
Commit
494cfe09
authored
Feb 23, 2020
by
Stephan Seitz
Browse files
Set ast._target of copy kernel to 'opencl'
parent
f69deec7
Changes
1
Hide whitespace changes
Inline
Side-by-side
pystencils/gpucuda/periodicity.py
View file @
494cfe09
...
...
@@ -35,13 +35,14 @@ def get_periodic_boundary_functor(stencil, domain_size, index_dimensions=0, inde
assert
target
in
[
'gpu'
,
'opencl'
]
src_dst_slice_tuples
=
get_periodic_boundary_src_dst_slices
(
stencil
,
ghost_layers
,
thickness
)
kernels
=
[]
index_dimensions
=
index_dimensions
for
src_slice
,
dst_slice
in
src_dst_slice_tuples
:
ast
=
create_copy_kernel
(
domain_size
,
src_slice
,
dst_slice
,
index_dimensions
,
index_dim_shape
,
dtype
)
if
target
==
'gpu'
:
kernels
.
append
(
pystencils
.
gpucuda
.
make_python_function
(
ast
))
else
:
ast
.
_target
=
'opencl'
ast
.
_backend
=
'opencl'
kernels
.
append
(
pystencils
.
opencl
.
make_python_function
(
ast
,
opencl_queue
,
opencl_ctx
))
def
functor
(
pdfs
,
**
_
):
...
...
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