This issue comes from https://github.com/Samsung/ONE/issues/2610#issuecomment-654663283
It seems there is room for optimization for WICPlanner.
Current implementation of WICPlanner::buildMemoryPlans
Time complexity
O(NlogN)O(N^2)O(NM)O(N^2)I'll find a way to remove O(N^2) in Step 2. i
_mem_plans has operand to {offset,size} map_mem_plans instead of _claimed_plansO(NMlogM)[WICPlanner] claim takes 0 ms
[WICPlanner] buildMemoryPlan takes 0 ms
[WICPlanner] claim takes 92 ms
[WICPlanner] buildMemoryPlan takes 147 ms
===================================
MODEL_LOAD takes 23.942 ms
PREPARE takes 443.932 ms
EXECUTE takes 9.454 ms
- MEAN : 9.454 ms
- MAX : 9.454 ms
- MIN : 9.454 ms
- GEOMEAN : 9.454 ms
===================================
[WICPlanner] claim takes 0 ms
[WICPlanner] buildMemoryPlan takes 0 ms
[WICPlanner] claim takes 92 ms
[WICPlanner] buildMemoryPlan takes 99 ms
===================================
MODEL_LOAD takes 21.785 ms
PREPARE takes 373.272 ms
EXECUTE takes 9.680 ms
- MEAN : 9.680 ms
- MAX : 9.680 ms
- MIN : 9.680 ms
- GEOMEAN : 9.680 ms
===================================
WICPlanner::claimstd::unordered_set for _interference_graphstd::unordered_set will be removed[WICPlanner] claim takes 0 ms
[WICPlanner] buildMemoryPlan takes 0.007 ms
[WICPlanner] claim takes 16.205 ms
[WICPlanner] buildMemoryPlan takes 54.898 ms
===================================
MODEL_LOAD takes 23.002 ms
PREPARE takes 241.202 ms
EXECUTE takes 9.484 ms
- MEAN : 9.484 ms
- MAX : 9.484 ms
- MIN : 9.484 ms
- GEOMEAN : 9.484 ms
===================================
Done.
Most helpful comment
Trial 2 : Using std::vector for _interference_graph
WICPlanner::claimstd::unordered_setfor _interference_graphstd::unordered_setwill be removedTrial 2 577c32eb0363e6c4785cec0d9daa52b6227c651e