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
Wiki
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
Ben Sepanski
loopy
Commits
eb54491a
Commit
eb54491a
authored
7 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Plain Diff
Merge branch 'check-no-sync-with-attributes' into 'master'
Check no_sync_with attribute in check_insn_attributes() Closes
#55
See merge request
!131
parents
91513dcf
5463cdfc
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
loopy/check.py
+19
-0
19 additions, 0 deletions
loopy/check.py
with
19 additions
and
0 deletions
loopy/check.py
+
19
−
0
View file @
eb54491a
...
...
@@ -60,6 +60,12 @@ def check_identifiers_in_subst_rules(knl):
# {{{ sanity checks run pre-scheduling
# FIXME: Replace with an enum. See
# https://gitlab.tiker.net/inducer/loopy/issues/85
VALID_NOSYNC_SCOPES
=
frozenset
([
"
local
"
,
"
global
"
,
"
any
"
])
def
check_insn_attributes
(
kernel
):
all_insn_ids
=
set
(
insn
.
id
for
insn
in
kernel
.
instructions
)
...
...
@@ -76,6 +82,19 @@ def check_insn_attributes(kernel):
%
(
insn
.
id
,
"
,
"
.
join
(
insn
.
depends_on
-
all_insn_ids
)))
no_sync_with_insn_ids
=
set
(
id
for
id
,
scope
in
insn
.
no_sync_with
)
if
not
no_sync_with_insn_ids
<=
all_insn_ids
:
raise
LoopyError
(
"
insn
'
%s
'
has nosync directive with unknown
"
"
instruction ids: %s
"
%
(
insn
.
id
,
"
,
"
.
join
(
no_sync_with_insn_ids
-
all_insn_ids
)))
no_sync_with_scopes
=
set
(
scope
for
id
,
scope
in
insn
.
no_sync_with
)
if
not
no_sync_with_scopes
<=
VALID_NOSYNC_SCOPES
:
raise
LoopyError
(
"
insn
'
%s
'
has invalid nosync scopes: %s
"
%
(
insn
.
id
,
"
,
"
.
join
(
no_sync_with_scopes
-
VALID_NOSYNC_SCOPES
)))
def
check_loop_priority_inames_known
(
kernel
):
for
prio
in
kernel
.
loop_priority
:
...
...
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