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/03 23:43:24 UTC

[GitHub] [incubator-tvm] zhiics commented on a change in pull request #6388: [Relay][Topi][Op]Advanced indexing

zhiics commented on a change in pull request #6388:
URL: https://github.com/apache/incubator-tvm/pull/6388#discussion_r483309342



##########
File path: tests/python/relay/test_any.py
##########
@@ -893,6 +893,24 @@ def test_any_ndarray_size():
     verify_any_ndarray_size((2, 2))
     verify_any_ndarray_size((1, 2, 3, 4))
 
+def test_any_adv_index():
+    data = relay.var("data", shape=(5, relay.Any(), relay.Any()), dtype='float32')
+    index0 = relay.var("index0", shape=(1, relay.Any()), dtype='int64')
+    index1 = relay.var("index1", shape=(1, relay.Any()), dtype='int64')
+    out = relay.adv_index([data, index0, index1])
+    mod = tvm.IRModule()
+    mod['main'] = relay.Function([data, index0, index1], out)
+    np_data_shape = (5, 5, 10)
+    np_index_shape = (1, 4)
+    np_data = np.random.uniform(size=np_data_shape).astype('float32')
+    np_index = np.random.uniform(0, np_data_shape[0], size=np_index_shape).astype('int64')
+    ref_res = np_data[tuple([np_index, np_index])]
+
+    for kind in ["debug", "vm"]:

Review comment:
       we can just use `check_result`, but it seems we don't have gpu schedule for it?




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