Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils
Commits
64454993
Commit
64454993
authored
5 years ago
by
Stephan Seitz
Browse files
Options
Downloads
Patches
Plain Diff
Enable overriding of kwargs in SerialDataHandling.run_kernel
parent
0bb88bca
No related branches found
No related tags found
1 merge request
!143
Enable overriding of kwargs in SerialDataHandling.run_kernel
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pystencils/datahandling/serial_datahandling.py
+3
-2
3 additions, 2 deletions
pystencils/datahandling/serial_datahandling.py
with
3 additions
and
2 deletions
pystencils/datahandling/serial_datahandling.py
+
3
−
2
View file @
64454993
...
@@ -9,7 +9,8 @@ from pystencils.datahandling.datahandling_interface import DataHandling
...
@@ -9,7 +9,8 @@ from pystencils.datahandling.datahandling_interface import DataHandling
from
pystencils.datahandling.pycuda
import
PyCudaArrayHandler
from
pystencils.datahandling.pycuda
import
PyCudaArrayHandler
from
pystencils.datahandling.pyopencl
import
PyOpenClArrayHandler
from
pystencils.datahandling.pyopencl
import
PyOpenClArrayHandler
from
pystencils.field
import
(
from
pystencils.field
import
(
Field
,
FieldType
,
create_numpy_array_with_layout
,
layout_string_to_tuple
,
spatial_layout_string_to_tuple
)
Field
,
FieldType
,
create_numpy_array_with_layout
,
layout_string_to_tuple
,
spatial_layout_string_to_tuple
)
from
pystencils.slicing
import
normalize_slice
,
remove_ghost_layers
from
pystencils.slicing
import
normalize_slice
,
remove_ghost_layers
from
pystencils.utils
import
DotDict
from
pystencils.utils
import
DotDict
...
@@ -239,7 +240,7 @@ class SerialDataHandling(DataHandling):
...
@@ -239,7 +240,7 @@ class SerialDataHandling(DataHandling):
def
run_kernel
(
self
,
kernel_function
,
**
kwargs
):
def
run_kernel
(
self
,
kernel_function
,
**
kwargs
):
arrays
=
self
.
gpu_arrays
if
kernel_function
.
ast
.
backend
in
self
.
_GPU_LIKE_BACKENDS
else
self
.
cpu_arrays
arrays
=
self
.
gpu_arrays
if
kernel_function
.
ast
.
backend
in
self
.
_GPU_LIKE_BACKENDS
else
self
.
cpu_arrays
kernel_function
(
**
arrays
,
**
kwargs
)
kernel_function
(
**
{
**
arrays
,
**
kwargs
}
)
def
get_kernel_kwargs
(
self
,
kernel_function
,
**
kwargs
):
def
get_kernel_kwargs
(
self
,
kernel_function
,
**
kwargs
):
result
=
{}
result
=
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment