Skip to content

Commit 99048cb

Browse files
windclariontrevor-m
authored andcommitted
[RUNTIME] if a param not in input, we still consume it's data (apache#5990)
so the read pointer of stream can move forward Signed-off-by: windclarion <[email protected]>
1 parent 459a2ed commit 99048cb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/runtime/graph/graph_runtime.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,11 @@ void GraphRuntime::LoadParams(dmlc::Stream* strm) {
247247
CHECK(size == weight_names_.size()) << "Invalid parameters file format";
248248
for (size_t i = 0; i < size; ++i) {
249249
int in_idx = GetInputIndex(weight_names_[i]);
250-
if (in_idx < 0) continue;
250+
if (in_idx < 0) {
251+
NDArray temp;
252+
temp.Load(strm);
253+
continue;
254+
}
251255
uint32_t eid = this->entry_id(input_nodes_[in_idx], 0);
252256
CHECK_LT(eid, data_entry_.size());
253257

0 commit comments

Comments
 (0)