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
fafa5794
Commit
fafa5794
authored
5 years ago
by
Stephan Seitz
Browse files
Options
Downloads
Patches
Plain Diff
Check pyopencl.{CommandQueue,Context} in opencljit
parent
2854ab63
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!29
Basic support for OpenCL (experimental)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pystencils/opencl/opencljit.py
+4
-0
4 additions, 0 deletions
pystencils/opencl/opencljit.py
with
4 additions
and
0 deletions
pystencils/opencl/opencljit.py
+
4
−
0
View file @
fafa5794
...
...
@@ -14,6 +14,8 @@ def make_python_function(kernel_function_node, opencl_queue, opencl_ctx, argumen
or :func:`pystencils.gpucuda.created_indexed_cuda_kernel`
Args:
opencl_queue: a valid :class:`pyopencl.CommandQueue`
opencl_ctx: a valid :class:`pyopencl.Context`
kernel_function_node: the abstract syntax tree
argument_dict: parameters passed here are already fixed. Remaining parameters have to be passed to the
returned kernel functor.
...
...
@@ -22,6 +24,8 @@ def make_python_function(kernel_function_node, opencl_queue, opencl_ctx, argumen
compiled kernel as Python function
"""
import
pyopencl
as
cl
assert
opencl_ctx
,
"
No valid OpenCL context
"
assert
opencl_queue
,
"
No valid OpenCL queue
"
if
argument_dict
is
None
:
argument_dict
=
{}
...
...
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