ConvolutedDog commented on code in PR #18159:
URL: https://github.com/apache/tvm/pull/18159#discussion_r2228508630


##########
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:
   After the new FFI was introduced, `vm["main"](...)` returns an object of 
`<class 'tvm.ffi.container.Array'>`, so a `[0]` needs to be added.



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

Reply via email to