wrongtest commented on a change in pull request #6319:
URL: https://github.com/apache/incubator-tvm/pull/6319#discussion_r484190672



##########
File path: src/runtime/crt/common/ndarray.c
##########
@@ -76,7 +76,7 @@ int TVMNDArray_Load(TVMNDArray* ret, const char** strm) {
   *strm += sizeof(ndim);
   dtype = ((DLDataType*)*strm)[0];  // NOLINT(*)
   *strm += sizeof(dtype);
-  if ((ndim < 0) || (ndim > TVM_CRT_MAX_NDIM)) {
+  if (ndim > TVM_CRT_MAX_NDIM) {

Review comment:
       Sorry for not have noticed your comment later. I update related types of 
ndarray.c to int32_t. While original dlpack ndim is just defined as `int`, line 
71 use also `int` instead of int32_t. 
   
   I run a local compile with `-Wsign-compare -Wsign-conversion` to ensure not 
inconsistency introduced internally in this file. 




----------------------------------------------------------------
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:
[email protected]


Reply via email to