Commit 9e04a9b4 by Tianqi Chen

Fix Plan memory when multiple inplace option is available (#67)

parent 326d284b
...@@ -174,6 +174,7 @@ Graph PlanMemory(Graph ret) { ...@@ -174,6 +174,7 @@ Graph PlanMemory(Graph ret) {
uint32_t eid_out = idx.entry_id(nid, kv.second); uint32_t eid_out = idx.entry_id(nid, kv.second);
uint32_t eid_in = idx.entry_id(inode.inputs[kv.first]); uint32_t eid_in = idx.entry_id(inode.inputs[kv.first]);
if (ref_count[eid_in] == 1 && if (ref_count[eid_in] == 1 &&
storage[eid_out] == GraphAllocator::kBadStorageID &&
storage[eid_in] != GraphAllocator::kBadStorageID && storage[eid_in] != GraphAllocator::kBadStorageID &&
shape_vec[eid_out].Size() == shape_vec[eid_in].Size() && shape_vec[eid_out].Size() == shape_vec[eid_in].Size() &&
dtype_vec[eid_out] == dtype_vec[eid_in]) { dtype_vec[eid_out] == dtype_vec[eid_in]) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment