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
28e5c125
Commit
28e5c125
authored
13 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
For forced workgroup sizes: check that at least one iname maps to them.
parent
96eca21e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MEMO
+4
-7
4 additions, 7 deletions
MEMO
loopy/check.py
+22
-10
22 additions, 10 deletions
loopy/check.py
with
26 additions
and
17 deletions
MEMO
+
4
−
7
View file @
28e5c125
...
...
@@ -26,9 +26,6 @@ Things to consider
other inames
-> Is that reasonable?
- Parallel dimension splitting/merging via tags
-> unnecessary?
- Not using all hw loop dimensions causes an error, as
is the case for variant 3 in the rank_one test.
...
...
@@ -36,7 +33,7 @@ Things to consider
- Loopy as a data model for implementing custom rewritings
- We won't generate WAW
s
barrier-needing dependencies
- We won't generate WAW barrier-needing dependencies
from one instruction to itself.
To-do
...
...
@@ -44,9 +41,6 @@ To-do
- Automatically generate testing code vs. sequential.
- For forced workgroup sizes: check that at least one iname
maps to them.
- If isl can prove that all operands are positive, may use '/' instead of
'floor_div'.
...
...
@@ -92,6 +86,9 @@ Future ideas
Dealt with
^^^^^^^^^^
- For forced workgroup sizes: check that at least one iname
maps to them.
- variable shuffle detection
-> will need unification
...
...
This diff is collapsed.
Click to expand it.
loopy/check.py
+
22
−
10
View file @
28e5c125
...
...
@@ -5,7 +5,7 @@ from __future__ import division
# {{{ sanity checks run during scheduling
def
check_for_unused_hw_axes
(
kernel
):
def
check_for_unused_hw_axes
_in_insns
(
kernel
):
group_size
,
local_size
=
kernel
.
get_grid_sizes_as_exprs
()
group_axes
=
set
(
range
(
len
(
group_size
)))
...
...
@@ -144,8 +144,29 @@ def check_for_write_races(kernel):
"
is/are not referenced in the assignee index
"
%
(
insn
.
id
,
"
,
"
.
join
(
inames_without_write_dep
)))
def
check_for_orphaned_user_hardware_axes
(
kernel
):
from
loopy.kernel
import
LocalIndexTag
for
axis
in
kernel
.
local_sizes
:
found
=
False
for
tag
in
kernel
.
iname_to_tag
.
itervalues
():
if
isinstance
(
tag
,
LocalIndexTag
)
and
tag
.
axis
==
axis
:
found
=
True
break
if
not
found
:
raise
RuntimeError
(
"
user-requested local hardware axis %d
"
"
has no iname mapped to it
"
%
axis
)
# }}}
def
run_automatic_checks
(
kernel
):
check_for_orphaned_user_hardware_axes
(
kernel
)
check_for_double_use_of_hw_axes
(
kernel
)
check_for_unused_hw_axes_in_insns
(
kernel
)
check_for_inactive_iname_access
(
kernel
)
check_for_write_races
(
kernel
)
# {{{ sanity-check for implemented domains of each instruction
def
check_implemented_domains
(
kernel
,
implemented_domains
):
...
...
@@ -210,15 +231,6 @@ def check_implemented_domains(kernel, implemented_domains):
# }}}
def
run_automatic_checks
(
kernel
):
import
loopy.check
as
chk
chk
.
check_for_double_use_of_hw_axes
(
kernel
)
chk
.
check_for_unused_hw_axes
(
kernel
)
chk
.
check_for_inactive_iname_access
(
kernel
)
chk
.
check_for_write_races
(
kernel
)
# {{{ user-invoked checks
def
get_problems
(
kernel
,
parameters
):
...
...
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