MasterJH5574 commented on code in PR #14357:
URL: https://github.com/apache/tvm/pull/14357#discussion_r1143495742


##########
src/relax/transform/static_plan_block_memory.cc:
##########
@@ -107,7 +107,8 @@ class StorageToken : public ObjectRef {
     }
 
     ObjectPtr<StorageTokenNode> n = make_object<StorageTokenNode>();
-    n->bytes = (size * dtype.bits() * dtype.lanes() + 7) / 8;
+    int bytes_per_element = (dtype.bits() * dtype.lanes() + 7) / 8;
+    n->bytes = size * bytes_per_element;

Review Comment:
   Thanks for fixing! Credit to @Ubospica, we found that we can directly use 
`size * dtype.bytes() * dtype.lanes()`, which is equivalent with your fix.



-- 
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]

Reply via email to