Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tvm
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
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cld
ml
tvm
Commits
b076cad5
Commit
b076cad5
authored
6 years ago
by
Wuwei Lin
Committed by
ziheng
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[RELAY] Inline scalar compute (#2335)
parent
848dc39a
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
src/relay/backend/compile_engine.cc
+5
-0
5 additions, 0 deletions
src/relay/backend/compile_engine.cc
with
5 additions
and
0 deletions
src/relay/backend/compile_engine.cc
+
5
−
0
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_
;
};
...
...
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