Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
grudge
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Alexandru Fikl
grudge
Commits
55e0e518
Commit
55e0e518
authored
9 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Remove timing/flop counting instrumentation
parent
131ff43c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
grudge/execution.py
+3
-40
3 additions, 40 deletions
grudge/execution.py
with
3 additions
and
40 deletions
grudge/execution.py
+
3
−
40
View file @
55e0e518
...
...
@@ -404,7 +404,7 @@ class ExecutionMapper(mappers.Evaluator,
# {{{ executor
class
Executor
(
object
):
def
__init__
(
self
,
discr
,
code
,
debug_flags
,
instrumented
):
def
__init__
(
self
,
discr
,
code
,
debug_flags
):
self
.
discr
=
discr
self
.
code
=
code
self
.
elwise_linear_cache
=
{}
...
...
@@ -415,43 +415,6 @@ class Executor(object):
open_unique_debug_file
(
"
op-code
"
,
"
.txt
"
).
write
(
str
(
self
.
code
))
self
.
instrumented
=
instrumented
def
instrument
(
self
):
discr
=
self
.
discr
assert
discr
.
instrumented
from
pytools.log
import
time_and_count_function
from
grudge.tools
import
time_count_flop
from
grudge.tools
import
diff_rst_flops
,
mass_flops
if
discr
.
quad_min_degrees
:
from
warnings
import
warn
warn
(
"
flop counts for quadrature may be wrong
"
)
self
.
diff_rst
=
\
time_count_flop
(
self
.
diff_rst
,
discr
.
diff_timer
,
discr
.
diff_counter
,
discr
.
diff_flop_counter
,
diff_rst_flops
(
discr
))
self
.
do_elementwise_linear
=
\
time_count_flop
(
self
.
do_elementwise_linear
,
discr
.
el_local_timer
,
discr
.
el_local_counter
,
discr
.
el_local_flop_counter
,
mass_flops
(
discr
))
self
.
lift_flux
=
\
time_and_count_function
(
self
.
lift_flux
,
discr
.
lift_timer
,
discr
.
lift_counter
)
def
lift_flux
(
self
,
fgroup
,
matrix
,
scaling
,
field
,
out
):
from
grudge._internal
import
lift_flux
from
pytools
import
to_uncomplex_dtype
...
...
@@ -597,7 +560,7 @@ def process_sym_operator(sym_operator, post_bind_mapper=None,
def
bind
(
discr
,
sym_operator
,
post_bind_mapper
=
lambda
x
:
x
,
type_hints
=
{},
debug_flags
=
set
()
,
instrumented
=
False
):
debug_flags
=
set
()):
# from grudge.symbolic.mappers import QuadratureUpsamplerRemover
# sym_operator = QuadratureUpsamplerRemover(self.quad_min_degrees)(
# sym_operator)
...
...
@@ -621,7 +584,7 @@ def bind(discr, sym_operator, post_bind_mapper=lambda x: x, type_hints={},
from
grudge.symbolic.compiler
import
OperatorCompiler
code
=
OperatorCompiler
()(
sym_operator
,
type_hints
)
ex
=
Executor
(
discr
,
code
,
type_hints
,
instrumented
=
instrumented
)
ex
=
Executor
(
discr
,
code
,
type_hints
)
if
"
dump_dataflow_graph
"
in
debug_flags
:
ex
.
code
.
dump_dataflow_graph
()
...
...
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