janetsc commented on code in PR #13197:
URL: https://github.com/apache/tvm/pull/13197#discussion_r1004942097
##########
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:
The groups should be slightly adjusted:
`if ((entry_to_allocate->second < nbytes) || ((it->second <
entry_to_allocate->second) && (it->second >= nbytes))) {`
--
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]