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 2022/05/18 05:44:26 UTC
[GitHub] [tvm] Uhao-P opened a new issue, #11352: [Bug] tvm.nd.ndarray to numpy taking too much time?
Uhao-P opened a new issue, #11352:
URL: https://github.com/apache/tvm/issues/11352
` target = 'cuda'
dev = tvm.cuda(0)
with tvm.transform.PassContext(opt_level=3):
lib = relay.build(mod, target=target, params=params)
dtype = "float32"
m = graph_executor.GraphModule(lib["default"](dev))
m.set_input(input_name, tvm.nd.array(img.astype(dtype)))
m.run()
t1 = time.time()
tvm_output = m.get_output(0) # shape: 184,720,3
t2 = time.time()
print(t2 - t1) # 180ms
pred = torch.argmax(torch.from_numpy(tvm_output.numpy()), 1).squeeze(0).cpu().data.numpy()
`
--
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: commits-unsubscribe@tvm.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] masahi commented on issue #11352: [Bug] tvm.nd.ndarray to numpy taking too much time?
Posted by GitBox <gi...@apache.org>.
masahi commented on issue #11352:
URL: https://github.com/apache/tvm/issues/11352#issuecomment-1129617606
`m.run()` is non-blocking on cuda, so `m.get_output(0)` actually involves waiting for the execution to finish.
--
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: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] masahi closed issue #11352: [Bug] tvm.nd.ndarray to numpy taking too much time?
Posted by GitBox <gi...@apache.org>.
masahi closed issue #11352: [Bug] tvm.nd.ndarray to numpy taking too much time?
URL: https://github.com/apache/tvm/issues/11352
--
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: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org