Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-codegen
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Christian Heinigk
dune-codegen
Commits
e00897a6
Commit
e00897a6
authored
5 years ago
by
René Heß
Browse files
Options
Downloads
Patches
Plain Diff
[skip ci] Add logging to autotuning
parent
33d9074b
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
python/dune/codegen/sumfact/autotune.py
+5
-2
5 additions, 2 deletions
python/dune/codegen/sumfact/autotune.py
with
5 additions
and
2 deletions
python/dune/codegen/sumfact/autotune.py
+
5
−
2
View file @
e00897a6
...
@@ -5,6 +5,7 @@ import re
...
@@ -5,6 +5,7 @@ import re
import
subprocess
import
subprocess
import
filelock
import
filelock
import
hashlib
import
hashlib
import
logging
import
json
import
json
from
operator
import
mul
from
operator
import
mul
from
six.moves
import
reduce
from
six.moves
import
reduce
...
@@ -435,6 +436,8 @@ def autotune_realization(sf=None, kernel=None, signature=None, transformations=N
...
@@ -435,6 +436,8 @@ def autotune_realization(sf=None, kernel=None, signature=None, transformations=N
assert
kernel
is
None
assert
kernel
is
None
assert
signature
is
None
assert
signature
is
None
logger
=
logging
.
getLogger
(
__name__
)
# Make sure that the benchmark directory exists
# Make sure that the benchmark directory exists
dir
=
os
.
path
.
join
(
get_option
(
"
project_basedir
"
),
"
autotune-benchmarks
"
)
dir
=
os
.
path
.
join
(
get_option
(
"
project_basedir
"
),
"
autotune-benchmarks
"
)
if
not
os
.
path
.
exists
(
dir
):
if
not
os
.
path
.
exists
(
dir
):
...
@@ -454,14 +457,14 @@ def autotune_realization(sf=None, kernel=None, signature=None, transformations=N
...
@@ -454,14 +457,14 @@ def autotune_realization(sf=None, kernel=None, signature=None, transformations=N
lock
=
os
.
path
.
join
(
dir
,
"
{}.lock
"
.
format
(
basename
))
lock
=
os
.
path
.
join
(
dir
,
"
{}.lock
"
.
format
(
basename
))
executable
=
os
.
path
.
join
(
dir
,
basename
)
executable
=
os
.
path
.
join
(
dir
,
basename
)
print
(
"
palpo filename: {}
"
.
format
(
filename
))
# Generate and compile a benchmark program
# Generate and compile a benchmark program
#
#
# Note: cache restoring is only necessary when generating from SumfactKernel
# Note: cache restoring is only necessary when generating from SumfactKernel
with
cache_restoring
():
with
cache_restoring
():
with
filelock
.
FileLock
(
lock
):
with
filelock
.
FileLock
(
lock
):
if
not
os
.
path
.
isfile
(
logname
):
if
not
os
.
path
.
isfile
(
logname
):
logger
.
debug
(
'
Generate autotune target in file {}
'
.
format
(
filename
))
if
sf
is
None
:
if
sf
is
None
:
generate_standalone_kernel_code
(
kernel
,
signature
,
filename
,
transformations
)
generate_standalone_kernel_code
(
kernel
,
signature
,
filename
,
transformations
)
elif
get_option
(
"
autotune_google_benchmark
"
):
elif
get_option
(
"
autotune_google_benchmark
"
):
...
...
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