sxjscience commented on a change in pull request #7230:
URL: https://github.com/apache/tvm/pull/7230#discussion_r555115290



##########
File path: tests/python/frontend/mxnet/test_forward.py
##########
@@ -1935,6 +1935,29 @@ def verify(data_shape, axis, use_length, length):
     verify((2, 3, 4), 2, True, np.array([[3, 4, 2], [1, 2, 
1]]).astype("int32"))
 
 
[email protected](
+    "data_shape, row_sel, col",
+    [
+        ((5, 7), (0, 1, 2, 3, 4,), 2),
+    ],
+)
[email protected]("dtype", ["float64", "float32"])
[email protected]_targets
[email protected]("kind", ["graph", "vm", "debug"])
+def test_forward_npi_advanced_indexing_multiple(data_shape, row_sel, col, 
dtype, target, ctx, kind):
+    data_np = np.random.uniform(size=data_shape).astype(dtype)
+    data = mx.sym.var("data")
+    ref_res = mx.np.array(data_np)[row_sel, col]
+
+    # TODO need to add the proper symbol operator
+    mx_sym = mx.sym.np.(data.as_np_ndarray()[row_sel, col])

Review comment:
       Is it possible to do the following?
   ```python
   row_sel_sym = mx.sym.var('row_sel').as_np_ndarray()
   col_sym = mx.sym.var('col').as_np_ndarray()
   data_sym = mx.sym.var('data').as_np_ndarray()
   mx_sym = data_sym[row_sel_sym, col_sym]
   
   ```
   
   Then, you may pass `mx_sym` to the `relay.frontend.from_mxnet`.




----------------------------------------------------------------
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:
[email protected]


Reply via email to