Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OpPerf] Fixes the issue when you pass NDArray to run_perf_test (apac…
…he#17508) * Fix typeError Fixes the issue when you pass NDArray to the opperf. It errors out ``` run_performance_test(nd.gather_nd, inputs=[{"data": (2, 22), "indices":nd.random_uniform(low=0,high=1,shape=(1,2))}], run_backward=T rue, warmup=1, runs=1) TypeError: isinstance() arg 2 must be a type or tuple of types ``` * Fix unexpected keyword argument 'ctx' error Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/ubuntu/incubator-mxnet/benchmark/opperf/utils/benchmark_utils.py", line 133, in run_performance_test args_list, kwargs_list = _prepare_op_inputs(inputs, run_backward, dtype, ctx) File "/home/ubuntu/incubator-mxnet/benchmark/opperf/utils/benchmark_utils.py", line 50, in _prepare_op_inputs attach_grad=run_backward) File "/home/ubuntu/incubator-mxnet/benchmark/opperf/utils/ndarray_utils.py", line 120, in get_mx_ndarray tensor = in_tensor.as_in_context(ctx=ctx).astype(dtype=dtype) TypeError: as_in_context() got an unexpected keyword argument 'ctx'
- Loading branch information