Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
islpy
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
Kaushik Kulkarni
islpy
Commits
2c8016e4
Commit
2c8016e4
authored
9 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Add better schedule test (from Tobias Grosser)
parent
0d2d4e0f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_isl.py
+14
-14
14 additions, 14 deletions
test/test_isl.py
with
14 additions
and
14 deletions
test/test_isl.py
+
14
−
14
View file @
2c8016e4
...
@@ -158,27 +158,27 @@ def test_eval_pw_qpolynomial():
...
@@ -158,27 +158,27 @@ def test_eval_pw_qpolynomial():
def
test_schedule
():
def
test_schedule
():
schedule
=
isl
.
UnionMap
(
"
{A[i,j] -> [i,j]: 0 < i < j < 100}
"
)
schedule
=
isl
.
Map
(
"
{S[t,i,j] -> [t,i,j]: 0 < t < 20 and 0 < i < j < 100}
"
)
accesses
=
isl
.
Map
(
"
{S[t,i,j] -> bar[t%2, i+1, j-1]}
"
)
context
=
isl
.
Set
(
"
{:}
"
)
context
=
isl
.
Set
(
"
{:}
"
)
build
=
isl
.
AstBuild
.
from_context
(
context
)
build
=
isl
.
AstBuild
.
from_context
(
context
)
def
callback
(
node
,
build
):
def
callback
(
node
,
build
):
return
None
schedulemap
=
build
.
get_schedule
()
accessmap
=
accesses
.
apply_domain
(
schedulemap
)
aff
=
isl
.
PwMultiAff
.
from_map
(
isl
.
Map
.
from_union_map
(
accessmap
))
access
=
build
.
call_from_pw_multi_aff
(
aff
)
return
isl
.
AstNode
.
alloc_user
(
access
)
build
,
callback_handle
=
build
.
set_a
fter
_each_
for
(
callback
)
build
,
callback_handle
=
build
.
set_a
t
_each_
domain
(
callback
)
try
:
ast
=
build
.
ast_from_schedule
(
schedule
)
ast
=
build
.
ast_from_schedule
(
schedule
)
except
isl
.
Error
:
# expected for now -- callback needs to return an AstNode,
# but I don't know how to make one.
pass
else
:
printer
=
isl
.
Printer
.
to_str
(
isl
.
DEFAULT_CONTEXT
)
printer
=
isl
.
P
rinter
.
to_str
(
isl
.
DEFAULT_CONTEXT
)
printer
=
p
rinter
.
set_output_format
(
isl
.
format
.
C
)
printer
=
printer
.
set_output_format
(
4
)
printer
=
printer
.
print_ast_node
(
ast
)
printer
=
printer
.
print_ast_node
(
ast
)
print
(
printer
.
get_str
())
print
(
printer
.
get_str
())
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
...
...
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