Skip to content
Snippets Groups Projects
Commit 28e5c125 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

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
......@@ -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 WAWs 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
......
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment