Skip to content

Commit

Permalink
Workaround for using module.benchmark() on micro targets
Browse files Browse the repository at this point in the history
Workaround for error:

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
  • Loading branch information
gromero committed Oct 22, 2021
1 parent 825376f commit a63a486
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/tvm/runtime/device_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ inline const char* DeviceName(int type) {
return "webgpu";
case kDLHexagon:
return "hexagon";
case 129:
return "micro";
default:
LOG(FATAL) << "unknown type =" << type;
return "Unknown";
Expand Down

0 comments on commit a63a486

Please sign in to comment.