tqchen commented on code in PR #18027:
URL: https://github.com/apache/tvm/pull/18027#discussion_r2120946236


##########
src/runtime/device_api.cc:
##########
@@ -111,7 +111,7 @@ size_t DeviceAPI::GetDataSize(const DLTensor& arr, 
Optional<String> mem_scope) {
     for (int i = 0; i < arr.ndim; ++i) {
       size *= static_cast<size_t>(arr.shape[i]);
     }
-    size *= (arr.dtype.bits * arr.dtype.lanes + 7) / 8;
+    size = (size * arr.dtype.bits * arr.dtype.lanes + 7) / 8;

Review Comment:
   consider redirect to 
https://github.com/apache/tvm/blob/main/ffi/include/tvm/ffi/container/ndarray.h#L96



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