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
aa0434b6
Commit
aa0434b6
authored
12 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Reenable domain check in multi-domain.
parent
7955a50d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
MEMO
+5
-6
5 additions, 6 deletions
MEMO
loopy/check.py
+19
-7
19 additions, 7 deletions
loopy/check.py
loopy/codegen/__init__.py
+2
-2
2 additions, 2 deletions
loopy/codegen/__init__.py
with
26 additions
and
15 deletions
MEMO
+
5
−
6
View file @
aa0434b6
...
...
@@ -46,9 +46,6 @@ To-do
- Group instructions by dependency/inames for scheduling, to
increase sched. scalability
- Multi-domain
- Reenable codegen sanity check.
- Kernel splitting (via what variables get computed in a kernel)
- What if no universally valid precompute base index expression is found?
...
...
@@ -56,8 +53,6 @@ To-do
- Add dependencies after the fact
- Expose iname-duplicate-and-rename as a primitive.
- Fix all tests
- Scalar insn priority
...
...
@@ -71,6 +66,8 @@ To-do
Future ideas
^^^^^^^^^^^^
- Expose iname-duplicate-and-rename as a primitive.
- Array language
- reg rolling
...
...
@@ -121,7 +118,9 @@ Dealt with
- What to do about constants in codegen? (...f suffix, complex types)
-> dealt with by type contexts
- relating to Multi-Domain
- relating to Multi-Domain [DONE]
- Reenable codegen sanity check. [DONE]
- Incorporate loop-bound-mediated iname dependencies into domain
parenthood. [DONE]
...
...
This diff is collapsed.
Click to expand it.
loopy/check.py
+
19
−
7
View file @
aa0434b6
...
...
@@ -209,12 +209,7 @@ def run_automatic_checks(kernel):
def
check_implemented_domains
(
kernel
,
implemented_domains
):
from
islpy
import
dim_type
parameter_inames
=
set
(
kernel
.
domain
.
get_dim_name
(
dim_type
.
param
,
i
)
for
i
in
range
(
kernel
.
domain
.
dim
(
dim_type
.
param
)))
from
islpy
import
align_spaces
assumptions
=
align_spaces
(
kernel
.
assumptions
,
kernel
.
domain
)
from
islpy
import
align_spaces
,
align_two
for
insn_id
,
idomains
in
implemented_domains
.
iteritems
():
insn
=
kernel
.
id_to_insn
[
insn_id
]
...
...
@@ -224,17 +219,34 @@ def check_implemented_domains(kernel, implemented_domains):
insn_impl_domain
=
idomains
[
0
]
for
idomain
in
idomains
[
1
:]:
insn_impl_domain
=
insn_impl_domain
|
idomain
assumptions
=
align_spaces
(
kernel
.
assumptions
,
insn_impl_domain
,
obj_bigger_ok
=
True
)
insn_impl_domain
=
(
(
insn_impl_domain
&
assumptions
)
.
project_out_except
(
kernel
.
insn_inames
(
insn
),
[
dim_type
.
set
]))
desired_domain
=
((
kernel
.
domain
&
assumptions
)
insn_inames
=
kernel
.
insn_inames
(
insn
)
insn_domain
=
kernel
.
get_inames_domain
(
insn_inames
)
assumptions
=
align_spaces
(
kernel
.
assumptions
,
insn_domain
,
obj_bigger_ok
=
True
)
desired_domain
=
((
insn_domain
&
assumptions
)
.
project_out_except
(
kernel
.
insn_inames
(
insn
),
[
dim_type
.
set
]))
insn_impl_domain
,
desired_domain
=
align_two
(
insn_impl_domain
,
desired_domain
)
print
insn_impl_domain
print
desired_domain
print
insn_impl_domain
!=
desired_domain
if
insn_impl_domain
!=
desired_domain
:
i_minus_d
=
insn_impl_domain
-
desired_domain
d_minus_i
=
desired_domain
-
insn_impl_domain
parameter_inames
=
set
(
insn_domain
.
get_dim_name
(
dim_type
.
param
,
i
)
for
i
in
range
(
kernel
.
domain
.
dim
(
dim_type
.
param
)))
lines
=
[]
for
kind
,
diff_set
in
[
(
"
implemented, but not desired
"
,
i_minus_d
),
...
...
This diff is collapsed.
Click to expand it.
loopy/codegen/__init__.py
+
2
−
2
View file @
aa0434b6
...
...
@@ -331,8 +331,8 @@ def generate_code(kernel, with_annotation=False,
)
"""
))
#
from loopy.check import check_implemented_domains
#
assert check_implemented_domains(kernel, gen_code.implemented_domains)
from
loopy.check
import
check_implemented_domains
assert
check_implemented_domains
(
kernel
,
gen_code
.
implemented_domains
)
# {{{ handle preambles
...
...
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