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
Commits
6d1490b3
Commit
6d1490b3
authored
11 years ago
by
Jean-Matthieu Etancelin
Browse files
Options
Downloads
Patches
Plain Diff
Update the OpenCL kernel benchmark tool
parent
2fee175a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
HySoP/hysop/gpu/kernel_benchmark.py
+4
-4
4 additions, 4 deletions
HySoP/hysop/gpu/kernel_benchmark.py
with
4 additions
and
4 deletions
HySoP/hysop/gpu/kernel_benchmark.py
+
4
−
4
View file @
6d1490b3
...
@@ -4,8 +4,7 @@
...
@@ -4,8 +4,7 @@
Package for benchmarking OpenCL kernels.
Package for benchmarking OpenCL kernels.
"""
"""
from
parmepy.gpu
import
cl
from
parmepy.gpu
import
cl
from
parmepy.gpu.tools
import
get_opencl_environment
from
parmepy.constants
import
np
,
PARMES_REAL
from
parmepy.constant
import
np
,
PARMES_REAL
import
pickle
import
pickle
...
@@ -240,7 +239,8 @@ def find_min(filename, kernel=None, version=None, config=None, size=None):
...
@@ -240,7 +239,8 @@ def find_min(filename, kernel=None, version=None, config=None, size=None):
class
Benchmark
:
class
Benchmark
:
"""
Benchmark management
"""
"""
Benchmark management
"""
def
__init__
(
self
,
kernel_file
,
kernel_name
,
sizes
,
config
,
setupFunction
,
def
__init__
(
self
,
cl_env
,
kernel_file
,
kernel_name
,
sizes
,
config
,
setupFunction
,
nb_run
=
20
,
inputs
=
None
,
precision
=
PARMES_REAL
):
nb_run
=
20
,
inputs
=
None
,
precision
=
PARMES_REAL
):
"""
"""
Creates a benchmark for a given source kernel_file, kernel for
Creates a benchmark for a given source kernel_file, kernel for
...
@@ -257,7 +257,7 @@ class Benchmark:
...
@@ -257,7 +257,7 @@ class Benchmark:
@param inputs : input data
@param inputs : input data
@param precision : Floating point precision for kernels
@param precision : Floating point precision for kernels
"""
"""
self
.
cl_env
=
get_opencl_environment
(
0
,
0
,
'
gpu
'
,
precision
,
sizes
[
0
])
self
.
cl_env
=
cl_env
self
.
platform
=
self
.
cl_env
.
platform
self
.
platform
=
self
.
cl_env
.
platform
self
.
device
=
self
.
cl_env
.
device
self
.
device
=
self
.
cl_env
.
device
self
.
ctx
=
self
.
cl_env
.
ctx
self
.
ctx
=
self
.
cl_env
.
ctx
...
...
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