You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/09/29 20:40:45 UTC

[GitHub] [incubator-tvm] tqchen commented on a change in pull request #6586: [RUNTIME] NDArray CopyFrom/To Bytes always synchronize

tqchen commented on a change in pull request #6586:
URL: https://github.com/apache/incubator-tvm/pull/6586#discussion_r497034108



##########
File path: src/runtime/ndarray.cc
##########
@@ -70,9 +70,12 @@ void ArrayCopyFromBytes(DLTensor* handle, const void* data, size_t nbytes) {
   cpu_ctx.device_id = 0;
   size_t arr_size = GetDataSize(*handle);
   CHECK_EQ(arr_size, nbytes) << "ArrayCopyFromBytes: size mismatch";
+  CHECK(IsContiguous(*handle)) << "ArrayCopyFromBytes only support contiguous array for now";

Review comment:
       Thanks @ANSHUMAN87 in this case i think the order of the check does not matter as much.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org