gromero commented on a change in pull request #9229:
URL: https://github.com/apache/tvm/pull/9229#discussion_r735772766
##########
File path: python/tvm/driver/tvmc/runner.py
##########
@@ -404,16 +513,24 @@ def run_module(
dev = session.vulkan()
elif device == "rocm":
dev = session.rocm()
+ elif device == "micro":
+ dev = session.device
+ lib = session.get_system_lib()
else:
assert device == "cpu"
dev = session.cpu()
+ # TODO(gromero): Adjust for micro targets.
Review comment:
Yeah. I meant here that currently `module.benchmark(dev, number=number,
repeat=repeat)` as used by the other targets is not working for micro targets
and will throw the following trace:
```
Traceback (most recent call last):
File "/home/gromero/scripts/./test.py", line 50, in <module>
times = module.benchmark(dev, number=1, repeat=1)
File "/home/gromero/git/tvm/python/tvm/contrib/graph_executor.py", line
407, in benchmark
return self.module.time_evaluator(
File "/home/gromero/git/tvm/python/tvm/runtime/module.py", line 292, in
evaluator
blob = feval(*args)
File "tvm/_ffi/_cython/./packed_func.pxi", line 323, in
tvm._ffi._cy3.core.PackedFuncBase.__call__
File "tvm/_ffi/_cython/./packed_func.pxi", line 257, in
tvm._ffi._cy3.core.FuncCall
File "tvm/_ffi/_cython/./packed_func.pxi", line 246, in
tvm._ffi._cy3.core.FuncCall3
File "tvm/_ffi/_cython/./base.pxi", line 163, in tvm._ffi._cy3.core.CALL
tvm._ffi.base.TVMError: Traceback (most recent call last):
3: TVMFuncCall
2: _ZNSt17_Function_handlerIFvN3tvm
1: tvm::runtime::WrapTimeEvaluator(tvm::runtime::PackedFunc, DLDevice,
int, int, int, tvm::runtime::PackedFunc)::{lambda(tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*)#1}::operator()(tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*)
0: tvm::runtime::Timer::Start(DLDevice)
File "/home/gromero/git/tvm/include/tvm/runtime/device_api.h", line 272
TVMError: unknown type =129
```
--
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]