areusch commented on a change in pull request #6319:
URL: https://github.com/apache/incubator-tvm/pull/6319#discussion_r477498454
##########
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:
@wrongtest I think it would make more sense here to change the type of
`ndim` to int to match the dlpack.h header:
https://github.com/dmlc/dlpack/blob/master/include/dlpack/dlpack.h#L136
then we'd need to keep the original check. would you be up for making this
change?
----------------------------------------------------------------
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]