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
b076cad5
Commit
b076cad5
authored
Dec 26, 2018
by
Wuwei Lin
Committed by
ziheng
Dec 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[RELAY] Inline scalar compute (#2335)
parent
848dc39a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/relay/backend/compile_engine.cc
+5
-0
No files found.
src/relay/backend/compile_engine.cc
View file @
b076cad5
...
...
@@ -84,6 +84,9 @@ class ScheduleGetter :
CHECK
(
master_op_
.
defined
());
Schedule
schedule
=
fschedule
[
master_op_
](
master_attrs_
,
cache_node
->
outputs
,
target_
);
for
(
const
auto
&
scalar
:
scalars_
)
{
schedule
[
scalar
].
compute_inline
();
}
return
std
::
make_pair
(
schedule
,
cfunc
);
}
...
...
@@ -123,6 +126,7 @@ class ScheduleGetter :
return
tvm
::
Expr
();
}
});
scalars_
.
push_back
(
value
->
op
);
return
{
value
};
}
...
...
@@ -216,6 +220,7 @@ class ScheduleGetter :
int
master_op_pattern_
{
0
};
std
::
ostringstream
readable_name_stream_
;
std
::
unordered_map
<
Expr
,
Array
<
Tensor
>
,
NodeHash
,
NodeEqual
>
memo_
;
Array
<
Operation
>
scalars_
;
};
...
...
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