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
1f867f4f
Commit
1f867f4f
authored
7 years ago
by
Dominic Kempf
Browse files
Options
Downloads
Patches
Plain Diff
Add a timer for the setup phase of each localoperator kernel
parent
f07df19f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/dune/perftool/pdelab/localoperator.py
+9
-4
9 additions, 4 deletions
python/dune/perftool/pdelab/localoperator.py
python/dune/perftool/sumfact/realization.py
+6
-0
6 additions, 0 deletions
python/dune/perftool/sumfact/realization.py
with
15 additions
and
4 deletions
python/dune/perftool/pdelab/localoperator.py
+
9
−
4
View file @
1f867f4f
...
@@ -614,10 +614,6 @@ class LoopyKernelMethod(ClassMember):
...
@@ -614,10 +614,6 @@ class LoopyKernelMethod(ClassMember):
content
.
append
(
'
{
'
)
content
.
append
(
'
{
'
)
if
kernel
is
not
None
:
if
kernel
is
not
None
:
# Add kernel preamble
for
i
,
p
in
kernel
.
preambles
:
content
.
append
(
'
'
+
p
)
# Start timer
# Start timer
if
add_timings
and
get_option
(
'
instrumentation_level
'
)
>=
3
:
if
add_timings
and
get_option
(
'
instrumentation_level
'
)
>=
3
:
from
dune.perftool.pdelab.signatures
import
assembler_routine_name
from
dune.perftool.pdelab.signatures
import
assembler_routine_name
...
@@ -627,6 +623,15 @@ class LoopyKernelMethod(ClassMember):
...
@@ -627,6 +623,15 @@ class LoopyKernelMethod(ClassMember):
content
.
append
(
'
'
+
'
HP_TIMER_START({});
'
.
format
(
timer_name
))
content
.
append
(
'
'
+
'
HP_TIMER_START({});
'
.
format
(
timer_name
))
dump_accumulate_timer
(
timer_name
)
dump_accumulate_timer
(
timer_name
)
if
add_timings
and
get_option
(
"
instrumentation_level
"
)
>=
4
:
setuptimer
=
'
{}_kernel_setup
'
.
format
(
assembler_routine_name
())
post_include
(
'
HP_DECLARE_TIMER({});
'
.
format
(
setuptimer
),
filetag
=
'
operatorfile
'
)
content
.
append
(
'
HP_TIMER_START({});
'
.
format
(
setuptimer
))
# Add kernel preamble
for
i
,
p
in
kernel
.
preambles
:
content
.
append
(
'
'
+
p
)
# Add kernel body
# Add kernel body
content
.
extend
(
l
for
l
in
generate_body
(
kernel
).
split
(
'
\n
'
)[
1
:
-
1
])
content
.
extend
(
l
for
l
in
generate_body
(
kernel
).
split
(
'
\n
'
)[
1
:
-
1
])
...
...
This diff is collapsed.
Click to expand it.
python/dune/perftool/sumfact/realization.py
+
6
−
0
View file @
1f867f4f
...
@@ -59,6 +59,12 @@ def _realize_sum_factorization_kernel(sf):
...
@@ -59,6 +59,12 @@ def _realize_sum_factorization_kernel(sf):
# Measure times and count operations in c++ code
# Measure times and count operations in c++ code
if
get_option
(
"
instrumentation_level
"
)
>=
4
:
if
get_option
(
"
instrumentation_level
"
)
>=
4
:
if
sf
.
stage
==
1
:
setuptimer
=
'
{}_kernel_setup
'
.
format
(
assembler_routine_name
())
insn_dep
=
insn_dep
.
union
(
frozenset
({
instruction
(
code
=
'
HP_TIMER_STOP({});
'
.
format
(
setuptimer
),
within_inames
=
frozenset
(
sf
.
within_inames
),
depends_on
=
insn_dep
)}))
timer_name
=
assembler_routine_name
()
+
'
_kernel
'
+
'
_stage{}
'
.
format
(
sf
.
stage
)
timer_name
=
assembler_routine_name
()
+
'
_kernel
'
+
'
_stage{}
'
.
format
(
sf
.
stage
)
post_include
(
'
HP_DECLARE_TIMER({});
'
.
format
(
timer_name
),
filetag
=
'
operatorfile
'
)
post_include
(
'
HP_DECLARE_TIMER({});
'
.
format
(
timer_name
),
filetag
=
'
operatorfile
'
)
dump_accumulate_timer
(
timer_name
)
dump_accumulate_timer
(
timer_name
)
...
...
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