ConvolutedDog commented on code in PR #18159:
URL: https://github.com/apache/tvm/pull/18159#discussion_r2228491680
##########
docs/how_to/tutorials/e2e_opt_model.py:
##########
@@ -119,6 +138,7 @@
# Need to allocate data and params on GPU device
gpu_data = tvm.nd.array(np.random.rand(1, 3, 224, 224).astype("float32"),
dev)
gpu_params = [tvm.nd.array(p, dev) for p in params["main"]]
- gpu_out = vm["main"](gpu_data, *gpu_params).numpy()
+ gpu_out = vm["main"](gpu_data, *gpu_params)
+ gpu_out = np.array([gpu_out[0].numpy()[0][j] for j in range(1000)])
Review Comment:
I have simplified the numpy conversion.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]