Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
6268e183
Commit
6268e183
authored
Apr 02, 2017
by
Tianqi Chen
Committed by
GitHub
Apr 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCHEDULE] Fix the scan schedule with rewriting (#80)
parent
54593ca1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
src/schedule/schedule_ops.cc
+7
-4
No files found.
src/schedule/schedule_ops.cc
View file @
6268e183
...
...
@@ -237,6 +237,13 @@ class SchedulePostProc : public IRMutator {
void
Init
(
const
Schedule
&
sch
)
{
for
(
Stage
s
:
sch
->
stages
)
{
// This must be checked for all ops, including scan.
if
(
!
s
->
op
.
same_as
(
s
->
origin_op
))
{
Tensor
target
=
s
->
origin_op
.
output
(
0
);
AddReplace
(
s
->
op
.
output
(
0
),
target
,
target
,
s
->
origin_op
);
}
// Specially add replacements for scan op.
if
(
s
->
op
.
as
<
ScanOpNode
>
())
{
const
ScanOpNode
*
scan
=
s
->
op
.
as
<
ScanOpNode
>
();
for
(
size_t
i
=
0
;
i
<
scan
->
update
.
size
();
++
i
)
{
...
...
@@ -245,10 +252,6 @@ class SchedulePostProc : public IRMutator {
AddReplace
(
scan
->
update
[
i
],
t
);
AddReplace
(
scan
->
state_placeholder
[
i
],
t
);
}
}
else
if
(
!
s
->
op
.
same_as
(
s
->
origin_op
))
{
Tensor
target
=
s
->
origin_op
.
output
(
0
);
AddReplace
(
s
->
op
.
output
(
0
),
target
,
target
,
s
->
origin_op
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment