janetsc commented on code in PR #13197:
URL: https://github.com/apache/tvm/pull/13197#discussion_r1005012767
##########
src/runtime/hexagon/hexagon_vtcm_pool.cc:
##########
@@ -85,7 +85,7 @@ void* HexagonVtcmPool::Allocate(size_t nbytes) {
auto entry_to_allocate = free_.begin();
for (auto it = free_.begin(); it != free_.end(); it++) {
- if ((it->second < entry_to_allocate->second) && (it->second >= nbytes)) {
+ if (((entry_to_allocate->second < nbytes) || (it->second <
entry_to_allocate->second)) && (it->second >= nbytes)) {
Review Comment:
But, that's ok because it will still find a free block that works if there
is one. But on reflection, I like your grouping better - I think it makes it
more clear for future editors.
--
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]