manupa-arm commented on code in PR #10547:
URL: https://github.com/apache/tvm/pull/10547#discussion_r908346632
##########
src/tir/usmp/algo/hill_climb.cc:
##########
@@ -155,8 +156,8 @@ class HillClimbAllocator : public GreedyBase {
void collect_neighbor_lists(const BufferInfoNode* buf,
std::vector<const BufferInfoNode*>* first_level,
std::vector<const BufferInfoNode*>*
second_level, const TPos& _pos) {
- std::unordered_map<int, const BufferInfoNode*> first_level_set;
- std::unordered_map<int, const BufferInfoNode*> second_level_set;
+ std::map<int, const BufferInfoNode*> first_level_set;
Review Comment:
This would be costly (in terms of runtime) just to maintain stability.
I think we should explore a seperated ordered structure to maintain this
instead (additionally).
##########
tests/python/unittest/test_tir_usmp_algo_hill_climb.py:
##########
@@ -22,7 +22,7 @@
from tvm.tir.usmp.utils import BufferInfo, PoolInfo
-def _check_max_workspace_size(buffer_pool_allocations, pool_info, size):
+def _check_max_workspace_size(buffer_pool_allocations, pool_info, size,
tolerance=0):
Review Comment:
Is there a test where tolerance is not zero ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]