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
f7fba4c0
Commit
f7fba4c0
authored
8 years ago
by
Dominic Kempf
Browse files
Options
Downloads
Patches
Plain Diff
Take substitutions from the kernel to avoid them being eliminated
parent
afcc773d
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/pdelab/localoperator.py
+13
-16
13 additions, 16 deletions
python/dune/perftool/pdelab/localoperator.py
with
13 additions
and
16 deletions
python/dune/perftool/pdelab/localoperator.py
+
13
−
16
View file @
f7fba4c0
...
...
@@ -498,27 +498,24 @@ def extract_kernel_from_cache(tag, wrap_in_cgen=True):
name
=
name
,
)
from
loopy
import
make_reduction_inames_unique
kernel
=
make_reduction_inames_unique
(
kernel
)
# Apply the transformations that were gathered during tree traversals
for
trafo
in
transformations
:
kernel
=
trafo
[
0
](
kernel
,
*
trafo
[
1
])
# Precompute all the substrules
for
sr
in
substrules
:
try
:
tmpname
=
"
precompute_{}
"
.
format
(
sr
.
name
)
kernel
=
lp
.
precompute
(
kernel
,
sr
.
name
,
temporary_name
=
tmpname
,
)
# Vectorization strategies are actually very likely to eliminate the
# precomputation temporary. To avoid the temporary elimination warning
# we need to explicitly disable it.
kernel
=
kernel
.
copy
(
silenced_warnings
=
kernel
.
silenced_warnings
+
[
"
temp_to_write({})
"
.
format
(
tmpname
)])
except
RunTimeError
:
pass
from
loopy
import
make_reduction_inames_unique
kernel
=
make_reduction_inames_unique
(
kernel
)
for
sr
in
kernel
.
substitutions
:
tmpname
=
"
precompute_{}
"
.
format
(
sr
)
kernel
=
lp
.
precompute
(
kernel
,
sr
,
temporary_name
=
tmpname
,
)
# Vectorization strategies are actually very likely to eliminate the
# precomputation temporary. To avoid the temporary elimination warning
# we need to explicitly disable it.
kernel
=
kernel
.
copy
(
silenced_warnings
=
kernel
.
silenced_warnings
+
[
"
temp_to_write({})
"
.
format
(
tmpname
)])
from
dune.perftool.loopy
import
heuristic_duplication
kernel
=
heuristic_duplication
(
kernel
)
...
...
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