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
2fc12dcd
Commit
2fc12dcd
authored
Nov 28, 2016
by
tqchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temp checkin of schedule ops
parent
28876530
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
1 deletions
+26
-1
src/pass/schedule_ops.cc
+26
-1
No files found.
src/pass/schedule_ops.cc
View file @
2fc12dcd
...
@@ -10,6 +10,23 @@ namespace tvm {
...
@@ -10,6 +10,23 @@ namespace tvm {
namespace
ir
{
namespace
ir
{
namespace
{
namespace
{
Stmt
MakeCompute
(
const
ComputeOpNode
*
op
,
const
Array
<
Split
>&
splits
)
{
Tensor
output
;
std
::
vector
<
Expr
>
args
(
op
->
dim_var
.
size
());
for
(
size_t
i
=
0
;
i
<
args
.
size
();
++
i
)
{
args
[
i
]
=
op
->
dim_var
[
i
];
}
Array
<
Expr
>
values
{
op
->
body
};
Stmt
stmt
=
Provide
::
make
(
output
,
values
,
args
);
// add splits from ousside most to outsidemost to innermost
return
stmt
;
}
Stmt
MakePipeline
(
const
Schedule
&
sch
,
Stmt
body
)
{
return
body
;
}
// inject the operator's realization on the stmt.
// inject the operator's realization on the stmt.
class
InjectRealize
:
public
IRMutator
{
class
InjectRealize
:
public
IRMutator
{
public
:
public
:
...
@@ -18,9 +35,17 @@ class InjectRealize : public IRMutator {
...
@@ -18,9 +35,17 @@ class InjectRealize : public IRMutator {
Stmt
Mutate
(
Stmt
stmt
)
final
{
Stmt
Mutate
(
Stmt
stmt
)
final
{
stmt
=
IRMutator
::
Mutate
(
stmt
);
stmt
=
IRMutator
::
Mutate
(
stmt
);
const
For
*
op
=
stmt
.
as
<
For
>
();
const
AttrStmt
*
op
=
stmt
.
as
<
AttrStmt
>
();
if
(
op
!=
nullptr
&&
op
->
type_key
==
"Split"
&&
op
->
node
==
sch_
->
attach_parent
)
{
return
AttrStmt
::
make
(
op
->
node
,
op
->
type_key
,
op
->
value
,
MakePipeline
(
sch_
,
op
->
body
));
}
else
{
return
stmt
;
return
stmt
;
}
}
}
private
:
private
:
// the operations to be carried
// the operations to be carried
...
...
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