Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arraycontext
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
arraycontext
Commits
c0062855
Commit
c0062855
authored
3 years ago
by
Andreas Klöckner
Committed by
Andreas Klöckner
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Put call_loopy in charge of the transform cache
parent
9d3c44d8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arraycontext/impl/pyopencl/__init__.py
+3
-7
3 additions, 7 deletions
arraycontext/impl/pyopencl/__init__.py
with
3 additions
and
7 deletions
arraycontext/impl/pyopencl/__init__.py
+
3
−
7
View file @
c0062855
...
...
@@ -167,7 +167,10 @@ class PyOpenCLArrayContext(ArrayContext):
try
:
t_unit
=
self
.
_loopy_transform_cache
[
t_unit
]
except
KeyError
:
orig_t_unit
=
t_unit
t_unit
=
self
.
transform_loopy_program
(
t_unit
)
self
.
_loopy_transform_cache
[
orig_t_unit
]
=
t_unit
del
orig_t_unit
evt
,
result
=
t_unit
(
self
.
queue
,
**
kwargs
,
allocator
=
self
.
allocator
)
...
...
@@ -192,12 +195,6 @@ class PyOpenCLArrayContext(ArrayContext):
# }}}
def
transform_loopy_program
(
self
,
t_unit
):
try
:
return
self
.
_loopy_transform_cache
[
t_unit
]
except
KeyError
:
pass
orig_t_unit
=
t_unit
from
warnings
import
warn
warn
(
"
Using arraycontext.PyOpenCLArrayContext.transform_loopy_program
"
"
to transform a program. This is deprecated and will stop working
"
...
...
@@ -259,7 +256,6 @@ class PyOpenCLArrayContext(ArrayContext):
t_unit
=
lp
.
split_iname
(
t_unit
,
inner_iname
,
16
,
inner_tag
=
"
l.0
"
)
t_unit
=
lp
.
tag_inames
(
t_unit
,
{
outer_iname
:
"
g.0
"
})
self
.
_loopy_transform_cache
[
orig_t_unit
]
=
t_unit
return
t_unit
def
tag
(
self
,
tags
:
Union
[
Sequence
[
Tag
],
Tag
],
array
):
...
...
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