Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hysop
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
particle_methods
hysop
Merge requests
!34
Add custom opencl
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add custom opencl
add-custom-opencl
into
master
Overview
0
Commits
12
Pipelines
3
Changes
1
Merged
EXT Jean-Matthieu Etancelin
requested to merge
add-custom-opencl
into
master
2 years ago
Overview
0
Commits
12
Pipelines
3
Changes
1
Expand
Add a custom operator implementation on OpenCL Backend.
User can give the OpenCL code snippet to be used within an OpenCL ElementwiseKernel.
0
0
Merge request reports
Viewing commit
6a04c165
Prev
Next
Show latest version
1 file
+
9
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
6a04c165
Merge branch 'add-custom-opencl' of git.univ-pau.fr:vortex/hysop into add-custom-opencl
· 6a04c165
EXT Jean-Matthieu Etancelin
authored
2 years ago
hysop/backend/device/opencl/operator/custom.py
+
9
−
0
Options
@@ -67,6 +67,15 @@ class OpenClCustomOperator(CustomOperatorBase, OpenClOperator):
self
.
func
,
f
"
__
{
self
.
name
}
_elementwise
"
,
preamble
=
str
(
cg
))
# Build testing:
try
:
self
.
__elementwise
.
get_kernel
(
False
)
except
cl
.
RuntimeError
as
e
:
print
(
"
USED KERNEL
"
)
print
(
"
,
"
.
join
(
kernel_args
))
print
(
str
(
cg
)
+
self
.
func
)
raise
e
@op_apply
def
apply
(
self
,
**
kwds
):
super
().
apply
(
**
kwds
)
Loading