MasterJH5574 commented on code in PR #18027:
URL: https://github.com/apache/tvm/pull/18027#discussion_r2119618070
##########
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:
Is this calculation correct for sub-byte dtypes such as fp4 and fp6?
--
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]