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
cc371342
Commit
cc371342
authored
12 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Fix fancy/microblocked padding, improve error in case of existing split.
parent
d6de5410
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/padding.py
+6
-3
6 additions, 3 deletions
loopy/padding.py
with
6 additions
and
3 deletions
loopy/padding.py
+
6
−
3
View file @
cc371342
...
...
@@ -28,6 +28,8 @@ def split_arg_axis(kernel, args_and_axes, count):
If *args_and_axes* is a :class:`tuple`, it is automatically
wrapped in a list, to make single splits easier.
Note that the corresponding index variables may *not* be split beforehand.
"""
if
count
==
1
:
...
...
@@ -120,7 +122,9 @@ def split_arg_axis(kernel, args_and_axes, count):
from
pymbolic.primitives
import
Variable
if
not
isinstance
(
axis_idx
,
Variable
):
raise
RuntimeError
(
"
found access
'
%s
'
in which axis %d is not a
"
"
single variable--cannot split
"
%
(
expr
,
axis_nr
))
"
single variable--cannot split (Have you tried to do the split
"
"
yourself, manually, beforehand? If so, you shouldn
'
t.)
"
%
(
expr
,
axis_nr
))
split_iname
=
expr
.
index
[
axis_nr
].
name
assert
split_iname
in
kernel
.
all_inames
()
...
...
@@ -134,7 +138,6 @@ def split_arg_axis(kernel, args_and_axes, count):
split_iname
+
"
_inner
"
)
split_vars
[
split_iname
]
=
outer_iname
,
inner_iname
idx
[
axis_nr
]
=
Variable
(
inner_iname
)
if
order
==
"
F
"
:
...
...
@@ -146,7 +149,7 @@ def split_arg_axis(kernel, args_and_axes, count):
return
expr
.
aggregate
[
tuple
(
idx
)]
aash
=
ArgAxisSplitHelper
(
arg_name
,
split_access_axis
)
aash
=
ArgAxisSplitHelper
(
set
(
arg_to_rest
.
iterkeys
())
,
split_access_axis
)
result
=
(
kernel
.
map_expressions
(
aash
)
...
...
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