kainzhong commented on PR #607: URL: https://github.com/apache/tvm-ffi/pull/607#issuecomment-4634436950
Ah sorry I didn't notice I was using numpy with a outdated version when I run my tests locally. I just updated it and now I see it returns strides with all zeros. Though I wonder for shape (4, 0, 4) if numpy reports strides (0, 0, 0) then my current implementation will say `is_contiguous()=False` since the expected stride (0, 4, 1) doesn't match (0, 0, 0) from numpy, which differs from numpy and pytorch since they would see an empty tensor as contiguous, but this implementation matches the C++ implementation in `include/tvm/ffi/container/tensor.h`. Do we need to also fix both of them by return True early when `numel()=0`? -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
