projects
/
platform
/
upstream
/
tvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8887b0f
)
[RUNTIME] if a param not in input, we still consume it's data (#5990)
author
windclarion
<windclarion@gmail.com>
Thu, 9 Jul 2020 04:52:24 +0000
(12:52 +0800)
committer
GitHub
<noreply@github.com>
Thu, 9 Jul 2020 04:52:24 +0000
(21:52 -0700)
so the read pointer of stream can move forward
Signed-off-by: windclarion <windclarion@gmail.com>
src/runtime/graph/graph_runtime.cc
patch
|
blob
|
history
diff --git
a/src/runtime/graph/graph_runtime.cc
b/src/runtime/graph/graph_runtime.cc
index
146c097
..
e984861
100644
(file)
--- a/
src/runtime/graph/graph_runtime.cc
+++ b/
src/runtime/graph/graph_runtime.cc
@@
-198,7
+198,11
@@
void GraphRuntime::LoadParams(dmlc::Stream* strm) {
CHECK(size == names.size()) << "Invalid parameters file format";
for (size_t i = 0; i < size; ++i) {
int in_idx = GetInputIndex(names[i]);
- if (in_idx < 0) continue;
+ if (in_idx < 0) {
+ NDArray temp;
+ temp.Load(strm);
+ continue;
+ }
uint32_t eid = this->entry_id(input_nodes_[in_idx], 0);
CHECK_LT(eid, data_entry_.size());