[GraphExecutor] Shared Memory bind and runtime reshaping#1408
[GraphExecutor] Shared Memory bind and runtime reshaping#1408piiswrong merged 3 commits intoapache:masterfrom
Conversation
|
Please add a few test cases on this, also suggest the following improvments.
|
|
I thought about sharing StorageAllocator at the start, but that actually doesn't work. Suppose ExecA has 2 chunks of memory, Rebind ExecB reuse 1 chunk and allocate 1 new chunk. Then ExecA destructs. Now The un-reused 1 chunk of memory stays there until all derived executors are deleted. |
|
Understand this case, however, I guess the point of shared memory execs is that all the shared execs destructs together. We can discuss a bit on this offline |
|
Not really. Usually you have one base exec. Then for each batch you derive a new exec with different size. After this batch the new exec destructs. Then if it allocated any new memory they will stay there unused before base destructs. |
|
@tqchen Done. Lets do a final pass and merge this. |
src/symbol/graph_memory_allocator.h
Outdated
| if (e->ctx != ctx) continue; | ||
| if (e->type_flag != type_flag) continue; | ||
| if (node_color_[e->released_by_node] != node_color_[node_id]) continue; | ||
| if (node_color_[e->released_by_node] != num_match_color_ + 1 |
There was a problem hiding this comment.
make dummy color a constant, so it is easier to expect what is going on
[GraphExecutor] Shared Memory bind and runtime reshaping
No description provided.