srkreddy1238 commented on code in PR #15058:
URL: https://github.com/apache/tvm/pull/15058#discussion_r1228986689
##########
src/runtime/graph_executor/graph_executor.cc:
##########
@@ -424,26 +423,36 @@ void GraphExecutor::SetupStorage() {
}
size_t bits = t.bits * t.lanes;
ICHECK(bits % 8U == 0U || bits == 1U || bits == 4U);
- int64_t bytes = ((bits + 7U) / 8U) * size;
- pool_entry[sid].shape[0] = std::max(pool_entry[sid].shape[0], bytes);
- pool_entry[sid].dtype = DLDataType{kDLFloat, 32, 1};
+ int64_t alloc_size = ((bits + 7U) / 8U) * size;
+
+ if (pool_entry[sid].alloc_size < alloc_size) {
Review Comment:
Default value for alloc_size is (-1). The condition will pass at least once.
I will check on the test case.
--
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]