Skip to content

Commit

Permalink
Fix Plan memory when multiple inplace option is available (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen authored Oct 6, 2016
1 parent d23d47e commit 60ccc0d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pass/plan_memory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ Graph PlanMemory(Graph ret) {
uint32_t eid_out = idx.entry_id(nid, kv.second);
uint32_t eid_in = idx.entry_id(inode.inputs[kv.first]);
if (ref_count[eid_in] == 1 &&
storage[eid_out] == GraphAllocator::kBadStorageID &&
storage[eid_in] != GraphAllocator::kBadStorageID &&
shape_vec[eid_out].Size() == shape_vec[eid_in].Size() &&
dtype_vec[eid_out] == dtype_vec[eid_in]) {
Expand Down

0 comments on commit 60ccc0d

Please sign in to comment.