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 2020/09/13 02:19:22 UTC

[GitHub] [incubator-tvm] mbrookhart commented on a change in pull request #6467: [ONNX] Update Slice op conversion to take strides into account, clean up tests

mbrookhart commented on a change in pull request #6467:
URL: https://github.com/apache/incubator-tvm/pull/6467#discussion_r487470773



##########
File path: tests/python/frontend/onnx/test_forward.py
##########
@@ -681,6 +675,32 @@ def test_slice():
         x, x, starts=(0, 0), ends=(9223372036854775807, 9223372036854775807), axes=(0, 3)
     )
 
+    def test_slice_with_strides():
+        class SliceWithStrides(torch.nn.Module):
+            def forward(self, x):
+                return x[..., 0::2] + x[..., 1::2]
+
+        class SliceWithStrides2(torch.nn.Module):
+            def forward(self, x):
+                return x[0::2, 0::2] + x[1::2, 1::2]
+

Review comment:
       Why do this with Pytorch? Having this kind of thing in this file means that people have to install even more frameworks if they want to be running/testing ONNX TVM. Why not just construct the ONNX graph manually like most of the rest of the 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.

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