This is an automated email from the ASF dual-hosted git repository. lukhut pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push: new bb2adbfc4a Improve error message in NDArray::CopyFromTo (#16539) bb2adbfc4a is described below commit bb2adbfc4abaad4608ad7dd6bd66248472dfc173 Author: Elen Kalda <elen.ka...@arm.com> AuthorDate: Tue Feb 13 09:14:34 2024 +0000 Improve error message in NDArray::CopyFromTo (#16539) Make it explicit that the quoted numbers are bytes. --- src/runtime/ndarray.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/ndarray.cc b/src/runtime/ndarray.cc index e47a399ae5..675ee62a05 100644 --- a/src/runtime/ndarray.cc +++ b/src/runtime/ndarray.cc @@ -290,7 +290,7 @@ void NDArray::CopyFromBytes(const void* data, size_t nbytes) { void NDArray::CopyFromTo(const DLTensor* from, DLTensor* to, TVMStreamHandle stream) { size_t from_size = GetDataSize(*from); size_t to_size = GetDataSize(*to); - ICHECK_EQ(from_size, to_size) << "TVMArrayCopyFromTo: The size must exactly match"; + ICHECK_EQ(from_size, to_size) << "TVMArrayCopyFromTo: The size in bytes must exactly match."; ICHECK(from->device.device_type == to->device.device_type || from->device.device_type == kDLCPU || to->device.device_type == kDLCPU || from->device.device_type == kDLCUDAHost ||