nverke commented on code in PR #13197:
URL: https://github.com/apache/tvm/pull/13197#discussion_r1004957356
##########
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:
Doesnt this lead to us updating entry_to_allocate for iterator values that
may not fit the desired allocation?
--
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]