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/09/15 20:28:35 UTC

[GitHub] [tvm] AndrewZhaoLuo opened a new pull request #9023: [TE] Support negative indices

AndrewZhaoLuo opened a new pull request #9023:
URL: https://github.com/apache/tvm/pull/9023


   Negative indices are a pretty common feature in most modern programming languages and libraries. This proposed PR would add optional support for negative indices out of the box for tensors in TE.
   
   A lot of operators from other frontends support negative indices. See ONNX, numpy, and PyTorch where their tensors support negative indices out of the box.
   
   One benefit of this change is now it is trivial to change operators to support negative indices. This makes adapting frontends to our operators simpler. For example an operator using this simply has to turn the `support_negative_indices` flag to true for every relevant indexing operation. An example of doing this can be found in https://github.com/AndrewZhaoLuo/tvm/blob/02f1870d7f2e274cfd7e04678691da019ff201f0/include/tvm/topi/transform.h#L1265. Right now how we handle negative indices is by manually converting them to positive indices which can be cumbersome and results in lots of code duplication.
   
   The downside is that it technically adds a little more computation per indexing operation. While these operations are probably memory and not compute bound I am not 100% confident that setting `support_negative_indices=true` would not result in performance regressions.


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



[GitHub] [tvm] junrushao1994 merged pull request #9023: [TE] Support negative indices

Posted by GitBox <gi...@apache.org>.
junrushao1994 merged pull request #9023:
URL: https://github.com/apache/tvm/pull/9023


   


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



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

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-1009188479


   @AndrewZhaoLuo yeah let's get it merged! 


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



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

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-920369621


   For the context, this PR was split from another PR following the discussion https://github.com/apache/tvm/pull/8971#discussion_r707850237


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



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

Posted by GitBox <gi...@apache.org>.
AndrewZhaoLuo commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-1009187484


   Oh, forgot about this as I moved to working on other things. We still cool with merging @junrushao1994 ?
   


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



[GitHub] [tvm] masahi edited a comment on pull request #9023: [TE] Support negative indices

Posted by GitBox <gi...@apache.org>.
masahi edited a comment on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-920369621


   For the context, this PR was split from another PR following the discussion https://github.com/apache/tvm/pull/8971#discussion_r707850237, since this could be potentially a controversial change (change the semantics of `te::Tensor` indexing)
   
   cc @tqchen @junrushao1994 


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



[GitHub] [tvm] masahi edited a comment on pull request #9023: [TE] Support negative indices

Posted by GitBox <gi...@apache.org>.
masahi edited a comment on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-920369621


   For the context, this PR was split from another PR following the discussion https://github.com/apache/tvm/pull/8971#discussion_r707850237
   
   cc @tqchen @junrushao1994 


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



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

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-925198606


   Ah no worries! I’m not suggesting changes :-) just unittests


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



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

Posted by GitBox <gi...@apache.org>.
AndrewZhaoLuo commented on a change in pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#discussion_r712522459



##########
File path: src/te/tensor.cc
##########
@@ -39,15 +39,26 @@ IterVar reduce_axis(Range dom, std::string name) { return IterVar(dom, Var(name)
 Var var(std::string name_hint, DataType t) { return Var(name_hint, t); }
 
 // Tensor
-PrimExpr Tensor::operator()(Array<Var> indices) const {
+PrimExpr Tensor::operator()(Array<Var> indices, bool support_negative_indices = false) const {
   Array<PrimExpr> arr(indices.begin(), indices.end());
-  return operator()(arr);
+  return operator()(arr, support_negative_indices);
 }
 
-PrimExpr Tensor::operator()(Array<PrimExpr> indices) const {
-  if (ndim() != 0) {
-    ICHECK_EQ(ndim(), indices.size()) << "Tensor dimension mismatch in read "
-                                      << "ndim = " << ndim() << ", indices.size=" << indices.size();
+PrimExpr Tensor::operator()(Array<PrimExpr> indices, bool support_negative_indices = false) const {
+  Array<PrimExpr> shape = (*this)->shape;
+
+  if (shape.size() != 0) {
+    ICHECK_EQ(shape.size(), indices.size())
+        << "Tensor dimension mismatch in read "
+        << "ndim = " << ndim() << ", indices.size=" << indices.size();
+  }
+
+  if (support_negative_indices) {
+    for (size_t i = 0; i < shape.size(); i++) {
+      PrimExpr new_index = if_then_else(indices[i] < make_const(indices[i]->dtype, 0),

Review comment:
       Done. 
   
   I understand the difference between if_then_else and Select
   
   Don't fully understand why we want to be able to evaluate both sides however. Is this to prevent branching?




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



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

Posted by GitBox <gi...@apache.org>.
AndrewZhaoLuo commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-925189236


   > It looks good to me given we want to fully support numpy-style negative indexing. On the API side, although I still think we can put this as a helper function in topi instead of a member function of `te::Tensor`, the difference is minimal because we are not making architectural change here. So nice work!
   > 
   > BTW, shall we add a unittest for this?
   
   I'll look into the changes you suggest and add a unit test.


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



[GitHub] [tvm] junrushao1994 edited a comment on pull request #9023: [TE] Support negative indices

Posted by GitBox <gi...@apache.org>.
junrushao1994 edited a comment on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-920494401


   I think I sort of understand the usecase here: some negative indices are known to be negative until in runtime. This forces us to defer the conversion from compile-time to runtime.
   
   On the other hand, I am not 100% sure if it is the best fix by adding a new argument in the public interface, given that in most cases indices are just positive and well in-range.
   
   I was thinking, if the issue comes from an importer, is it possible to add an operator like `normalize_indices`, mark it as `injective` which makes it fusible, so that there isn't architectural change in TE? What do you guys think?


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



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

Posted by GitBox <gi...@apache.org>.
AndrewZhaoLuo commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-1011330264


   @junrushao1994 this is now ready to merge


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



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

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-1008444770


   What's the status of this PR?


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



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

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-920494401


   I think I sort of understand the usecase here, where some indices are known negative only in runtime, which forces us to check things on runtime. On the other hand, I am not 100% sure if it is the best fix by adding a new argument in the public interface, given that in most cases indices are just positive and well in-range. If the issue comes from an importer, is it possible to add an operator like `normalize_indices`, mark it as `injective` which makes it fusible, so that there isn't architectural change? What do you guys think?


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



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

Posted by GitBox <gi...@apache.org>.
AndrewZhaoLuo commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-921111599


   > I think I sort of understand the usecase here: some negative indices are not known to be negative until in runtime. This forces us to defer the conversion from compile-time to runtime.
   > 
   > On the other hand, I am not 100% sure if it is the best fix by adding a new argument in the public interface, given that in most cases indices are just positive and well in-range.
   > 
   > I was thinking, if the issue comes from an importer, is it possible to add an operator like `normalize_indices`, mark it as `injective` which makes it fusible, so that there isn't architectural change in TE? What do you guys think?
   
   We do have a `normalize_indices` on the relay level. I think a problem though is the format might be slightly different so you would need a few different implementations. For example take tf's gather vs gather_nd. 


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



[GitHub] [tvm] tqchen edited a comment on pull request #9023: [TE] Support negative indices

Posted by GitBox <gi...@apache.org>.
tqchen edited a comment on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-920459959


   I think this can be useful for some of the indexing operations. We could try to make it more explicit though. e.g. introduce a new API. ```tensor.LookupWithNegativeIndices(indices)``` and explicitly call into them in these cases


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



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

Posted by GitBox <gi...@apache.org>.
mbrookhart commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-920426352


   I like this idea. I've been slowly throwing `relay.where` around the ops and the importers to solve this problem when I hit it, but that adds some complication to ops, fusion, and the risk of making things slower than they need to be. This would enable things to be much simpler at the Relay level in a number of places, I'm very curious to hear Tianqi and Junru's thoughts.


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



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

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-920469704


   @yzh119 I believe the intended usage was for the case where the value of indices are not known at compile time, otherwise compiler will be able to prove and simplify the conditionals


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



[GitHub] [tvm] tqchen commented on a change in pull request #9023: [TE] Support negative indices

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#discussion_r713249834



##########
File path: include/tvm/te/tensor.h
##########
@@ -100,6 +100,15 @@ class TensorNode : public DataProducerNode {
  *  or intermediate computation result.
  */
 class Tensor : public DataProducer {
+ private:
+  /*!
+   * \brief Helper for indexing operations into tensors
+   * \param indices The indices
+   * \param support_negative_indices Whether to normalize indices in the case of negative indices.
+   * \return the result expression representing tensor read.
+   */
+  inline PrimExpr index_tensor(Array<PrimExpr> indices, bool support_negative_indices) const;

Review comment:
       CamelCase per google code style




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



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

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-920459959


   I think this can be useful for some of the indexing operations. We could try to make it more explicit though. e.g. introduce a new API. ```Tensor.LookupWithNegativeIndices(indices)``` and explicitly call into them in these cases


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



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

Posted by GitBox <gi...@apache.org>.
AndrewZhaoLuo commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-923388365


   This is ready for another look though I might need some guidance for unit tests 


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



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

Posted by GitBox <gi...@apache.org>.
AndrewZhaoLuo commented on a change in pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#discussion_r713260400



##########
File path: include/tvm/te/tensor.h
##########
@@ -100,6 +100,15 @@ class TensorNode : public DataProducerNode {
  *  or intermediate computation result.
  */
 class Tensor : public DataProducer {
+ private:
+  /*!
+   * \brief Helper for indexing operations into tensors
+   * \param indices The indices
+   * \param support_negative_indices Whether to normalize indices in the case of negative indices.
+   * \return the result expression representing tensor read.
+   */
+  inline PrimExpr index_tensor(Array<PrimExpr> indices, bool support_negative_indices) const;

Review comment:
       Done




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



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

Posted by GitBox <gi...@apache.org>.
AndrewZhaoLuo commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-923144259


   I'll get ahead with this and start responding to comments if there are no other objections.


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



[GitHub] [tvm] tqchen commented on a change in pull request #9023: [TE] Support negative indices

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#discussion_r709643444



##########
File path: src/te/tensor.cc
##########
@@ -39,15 +39,26 @@ IterVar reduce_axis(Range dom, std::string name) { return IterVar(dom, Var(name)
 Var var(std::string name_hint, DataType t) { return Var(name_hint, t); }
 
 // Tensor
-PrimExpr Tensor::operator()(Array<Var> indices) const {
+PrimExpr Tensor::operator()(Array<Var> indices, bool support_negative_indices = false) const {
   Array<PrimExpr> arr(indices.begin(), indices.end());
-  return operator()(arr);
+  return operator()(arr, support_negative_indices);
 }
 
-PrimExpr Tensor::operator()(Array<PrimExpr> indices) const {
-  if (ndim() != 0) {
-    ICHECK_EQ(ndim(), indices.size()) << "Tensor dimension mismatch in read "
-                                      << "ndim = " << ndim() << ", indices.size=" << indices.size();
+PrimExpr Tensor::operator()(Array<PrimExpr> indices, bool support_negative_indices = false) const {
+  Array<PrimExpr> shape = (*this)->shape;
+
+  if (shape.size() != 0) {
+    ICHECK_EQ(shape.size(), indices.size())
+        << "Tensor dimension mismatch in read "
+        << "ndim = " << ndim() << ", indices.size=" << indices.size();
+  }
+
+  if (support_negative_indices) {
+    for (size_t i = 0; i < shape.size(); i++) {
+      PrimExpr new_index = if_then_else(indices[i] < make_const(indices[i]->dtype, 0),

Review comment:
       you want to use select here, because it does not involves a memory operation(thus can evaluate both sides)




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



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

Posted by GitBox <gi...@apache.org>.
yzh119 commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-920465162


   Is the negative indices used inside TE? If so I wonder can we make it a transformation pass rather than runtime behavior?


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



[GitHub] [tvm] junrushao1994 edited a comment on pull request #9023: [TE] Support negative indices

Posted by GitBox <gi...@apache.org>.
junrushao1994 edited a comment on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-920494401


   I think I sort of understand the usecase here: some negative indices are not known to be negative until in runtime. This forces us to defer the conversion from compile-time to runtime.
   
   On the other hand, I am not 100% sure if it is the best fix by adding a new argument in the public interface, given that in most cases indices are just positive and well in-range.
   
   I was thinking, if the issue comes from an importer, is it possible to add an operator like `normalize_indices`, mark it as `injective` which makes it fusible, so that there isn't architectural change in TE? What do you guys think?


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



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

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on pull request #9023:
URL: https://github.com/apache/tvm/pull/9023#issuecomment-1011444928


   Thanks @AndrewZhaoLuo! It's merged :-)


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



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

Posted by GitBox <gi...@apache.org>.
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