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
0d16223f
Commit
0d16223f
authored
6 years ago
by
Dominic Kempf
Browse files
Options
Downloads
Patches
Plain Diff
A bit more verbosity
parent
468e8569
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/perftool/sumfact/vectorization.py
+16
-3
16 additions, 3 deletions
python/dune/perftool/sumfact/vectorization.py
with
16 additions
and
3 deletions
python/dune/perftool/sumfact/vectorization.py
+
16
−
3
View file @
0d16223f
...
...
@@ -239,16 +239,29 @@ def level1_optimal_vectorization_strategy(sumfacts, width):
# If we are using the 'target' strategy, we might want to log some information.
if
get_form_option
(
"
vectorization_strategy
"
)
==
"
target
"
:
# Print the achieved cost and the target cost on the screen
set_form_option
(
"
vectorization_strategy
"
,
"
model
"
)
cost
=
strategy_cost
((
qp
,
optimal_strategies
[
qp
]))
print
(
"
The target cost was: {}
"
.
format
(
get_form_option
(
"
vectorization_target
"
)))
print
(
"
The achieved cost was: {}
"
.
format
(
cost
))
set_form_option
(
"
vectorization_strategy
"
,
"
target
"
)
print
(
"
The score in
'
target
'
logic was: {}
"
.
format
(
strategy_cost
((
qp
,
optimal_strategies
[
qp
]))))
# Print the employed vectorization strategy into a file
from
os.path
import
join
filename
=
join
(
get_option
(
"
project_basedir
"
),
"
targetstrat_{}
"
.
format
(
int
(
float
(
get_form_option
(
"
vectorization_target
"
)))))
filename
=
join
(
get_option
(
"
project_basedir
"
),
"
costmodel-verification
"
,
"
targetstrat_{}
.txt
"
.
format
(
int
(
float
(
get_form_option
(
"
vectorization_target
"
)))))
with
open
(
filename
,
'
w
'
)
as
f
:
f
.
write
(
"
\n
"
.
join
(
stringify_vectorization_strategy
((
qp
,
optimal_strategies
[
qp
]))))
set_form_option
(
"
vectorization_strategy
"
,
"
target
"
)
print
(
"
The score in
'
target
'
logic was: {}
"
.
format
(
strategy_cost
((
qp
,
optimal_strategies
[
qp
]))))
# Write an entry into a csvfile which connects the given measuring identifier with a cost
from
dune.testtools.parametertree.parser
import
parse_ini_file
inifile
=
parse_ini_file
(
get_option
(
"
inifile
"
))
identifier
=
inifile
[
"
identifier
"
]
filename
=
join
(
get_option
(
"
project_basedir
"
),
"
costmodel-verification
"
,
"
mapping.csv
"
)
#TODO: Depending on the number of samples, we might need a file lock here.
with
open
(
filename
,
'
a
'
)
as
f
:
f
.
write
(
"
{} {}
"
.
format
(
identifier
,
cost
))
return
qp
,
optimal_strategies
[
qp
]
...
...
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