Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
loopy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Andreas Klöckner
loopy
Commits
0026eb8b
Commit
0026eb8b
authored
13 years ago
by
Tim Warburton
Browse files
Options
Downloads
Patches
Plain Diff
Use loopy's own SubstitutionMapper (not pymbolic's substitute) in realize_cse().
parent
cc5a489a
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
loopy/__init__.py
+7
-4
7 additions, 4 deletions
loopy/__init__.py
with
7 additions
and
4 deletions
loopy/__init__.py
+
7
−
4
View file @
0026eb8b
...
...
@@ -320,10 +320,13 @@ def realize_cse(kernel, cse_tag, dtype, duplicate_inames=[], parallel_inames=Non
var
(
iname
)
for
iname
in
duplicate_inames
)]
from
pymbolic
import
substitute
new_inner_expr
=
substitute
(
rec
(
expr
.
child
),
dict
(
(
old_iname
,
var
(
new_iname
))
for
old_iname
,
new_iname
in
zip
(
duplicate_inames
,
new_inames
)))
from
loopy.symbolic
import
SubstitutionMapper
from
pymbolic.mapper.substitutor
import
make_subst_func
subst_map
=
SubstitutionMapper
(
make_subst_func
(
dict
(
(
old_iname
,
var
(
new_iname
))
for
old_iname
,
new_iname
in
zip
(
duplicate_inames
,
new_inames
))))
new_inner_expr
=
subst_map
(
rec
(
expr
.
child
))
# }}}
...
...
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