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 2021/10/01 06:12:20 UTC

[GitHub] [tvm] AndrewZhaoLuo commented on pull request #9023: [TE] Support negative indices

AndrewZhaoLuo commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-931939233


   @junrushao1994 looked at the unittests for cpp and they seem a little bare. I added a single simple test which logs the following results:
   
   A is of shape (x, y)
   
   A(0, 0):
   [23:09:53] /home/andrewzhaoluo/Desktop/dev/tvm/tests/cpp/tensor_test.cc:59: A[0, 0]
   
   A.IndexWithNegativeIndices(-1, -1):
   [23:09:53] /home/andrewzhaoluo/Desktop/dev/tvm/tests/cpp/tensor_test.cc:60: A[select((bool)1, (-1 + x), -1), select((bool)1, (-1 + y), -1)]
   
   A.IndexWithNegativeIndices(0, -1):
   [23:09:53] /home/andrewzhaoluo/Desktop/dev/tvm/tests/cpp/tensor_test.cc:61: A[select((bool)0, x, 0), select((bool)1, (-1 + y), -1)]
   
   Some guidance on what is sufficient would be helpful.


-- 
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: commits-unsubscribe@tvm.apache.org

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