mehrdadh commented on pull request #8259:
URL: https://github.com/apache/tvm/pull/8259#issuecomment-868728472
Here is a trackeback on this error. When I run the
`test_debug_graph_executor_profile` test that I added in this PR, I get this
error:
```
enabled targets: llvm -device=arm_cpu; llvm
pytest marker:
================================================================ test
session starts =================================================================
platform linux -- Python 3.6.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /workspace, configfile: pytest.ini
plugins: forked-1.3.0, xdist-2.2.1, profiling-1.7.0
collected 7 items / 6 deselected / 1 selected
tests/python/unittest/test_crt.py F
[100%]
======================================================================
FAILURES ======================================================================
_________________________________________________________
test_debug_graph_executor_profile
__________________________________________________________
@tvm.testing.requires_micro
def test_debug_graph_executor_profile():
"""Test use of the graph debug executor profile operation with
microTVM."""
import tvm.micro
workspace = tvm.micro.Workspace(debug=True)
relay_mod = tvm.parser.fromtext(
"""
#[version = "0.0.5"]
def @main(%a : Tensor[(1, 2), uint8], %b : Tensor[(1, 2), uint8]) {
%0 = %a + %b;
%0
}"""
)
with tvm.transform.PassContext(opt_level=3,
config={"tir.disable_vectorize": True}):
factory = tvm.relay.build(relay_mod, target=TARGET)
with _make_session(workspace, factory.get_lib()) as sess:
debug_g_mod = tvm.micro.create_local_debug_executor(
factory.get_graph_json(), sess.get_system_lib(), sess.device
)
A_data = tvm.nd.array(np.array([2, 3], dtype="uint8"),
device=sess.device)
B_data = tvm.nd.array(np.array([4, 7], dtype="uint8"),
device=sess.device)
input_dict = {"a": A_data, "b": B_data}
> timing_results = debug_g_mod.profile(**input_dict).csv()
tests/python/unittest/test_crt.py:200:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
python/tvm/contrib/debugger/debug_executor.py:287: in profile
return self._profile()
tvm/_ffi/_cython/./packed_func.pxi:323: in
tvm._ffi._cy3.core.PackedFuncBase.__call__
???
tvm/_ffi/_cython/./packed_func.pxi:257: in tvm._ffi._cy3.core.FuncCall
???
tvm/_ffi/_cython/./packed_func.pxi:246: in tvm._ffi._cy3.core.FuncCall3
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E tvm._ffi.base.TVMError: Traceback (most recent call last):
E 12: TVMFuncCall
E at /workspace/src/runtime/c_runtime_api.cc:474
E 11: tvm::runtime::PackedFunc::CallPacked(tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*) const
E at /workspace/include/tvm/runtime/packed_func.h:1151
E 10: std::function<void (tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*)>::operator()(tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*) const
E at /usr/include/c++/7/bits/std_function.h:706
E 9: _M_invoke
E at /usr/include/c++/7/bits/std_function.h:316
E 8: operator()
E at /workspace/include/tvm/runtime/packed_func.h:1492
E 7: unpack_call<tvm::runtime::profiling::Report, 0,
tvm::runtime::GraphExecutorDebug::GetFunction(const string&, const
tvm::runtime::ObjectPtr<t>
E at /workspace/include/tvm/runtime/packed_func.h:1421
E 6: run<>
E at /workspace/include/tvm/runtime/packed_func.h:1397
E 5: operator()
E at
/workspace/src/runtime/graph_executor/debug/graph_executor_debug.cc:370
E 4: tvm::runtime::GraphExecutorDebug::Profile()
E at
/workspace/src/runtime/graph_executor/debug/graph_executor_debug.cc:294
E 3: tvm::runtime::profiling::Profiler::Start(std::vector<DLDevice,
std::allocator<DLDevice> > const&)
E at /workspace/src/runtime/profiling.cc:106
E 2: tvm::runtime::Timer::Start(DLDevice)
E at /workspace/src/runtime/profiling.cc:87
E 1: tvm::runtime::DeviceName(int)
E at /workspace/include/tvm/runtime/object.h:383
E 0: tvm::runtime::DeviceName(int)
E at /workspace/include/tvm/runtime/device_api.h:263
E File "/workspace/include/tvm/runtime/device_api.h", line 263
E TVMError: unknown type =129
tvm/_ffi/_cython/./base.pxi:163: TVMError
```
and the `sess.device` is equal to `remote[0]:cpu(0)`
--
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]