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
b1c1eee9
Commit
b1c1eee9
authored
12 years ago
by
Jean-Matthieu Etancelin
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
acf1d5ee
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
HySoP/hysop/tools/kernel_benchmark.py
+17
-0
17 additions, 0 deletions
HySoP/hysop/tools/kernel_benchmark.py
with
17 additions
and
0 deletions
HySoP/hysop/tools/kernel_benchmark.py
+
17
−
0
View file @
b1c1eee9
...
@@ -194,6 +194,8 @@ class BenchmarkSuite:
...
@@ -194,6 +194,8 @@ class BenchmarkSuite:
f
.
write
(
k
+
"
"
)
f
.
write
(
k
+
"
"
)
f
.
write
(
v
+
"
"
)
f
.
write
(
v
+
"
"
)
f
.
write
(
c
+
"
"
)
f
.
write
(
c
+
"
"
)
Nx
=
s
[
0
]
f
.
write
(
str
(
eval
(
c
))
+
'
'
)
try
:
try
:
f
.
write
(
str
(
self
.
timings
[
k
][
v
][
c
][
s
])
+
"
\n
"
)
f
.
write
(
str
(
self
.
timings
[
k
][
v
][
c
][
s
])
+
"
\n
"
)
except
:
except
:
...
@@ -202,6 +204,21 @@ class BenchmarkSuite:
...
@@ -202,6 +204,21 @@ class BenchmarkSuite:
f
.
close
()
f
.
close
()
def
find_min
(
filename
,
kernel
=
None
,
version
=
None
,
config
=
None
,
size
=
None
):
d
=
pickle
.
load
(
open
(
filename
,
'
r
'
))
cc
=
{}
kl
=
d
.
keys
()
if
kernel
is
None
else
[
kernel
]
if
isinstance
(
kernel
,
str
)
else
kernel
for
k
in
kl
:
vl
=
d
[
k
].
keys
()
if
version
is
None
else
[
version
]
if
isinstance
(
version
,
str
)
else
version
for
v
in
vl
:
cl
=
d
[
k
][
v
].
keys
()
if
config
is
None
else
[
config
]
if
isinstance
(
config
,
str
)
else
config
for
c
in
cl
:
sl
=
d
[
k
][
v
][
c
].
keys
()
if
size
is
None
else
[
size
]
if
isinstance
(
size
,
tuple
)
else
size
for
s
in
sl
:
cc
[
k
+
'
_
'
+
v
+
'
_
'
+
c
]
=
d
[
k
][
v
][
c
][
s
]
print
cc
[
min
(
cc
,
key
=
cc
.
get
)],
min
(
cc
,
key
=
cc
.
get
)
class
Benchmark
:
class
Benchmark
:
"""
Benchmark management
"""
"""
Benchmark management
"""
...
...
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