junrushao1994 commented on pull request #7153:
URL: https://github.com/apache/tvm/pull/7153#issuecomment-801672549
I built and tested locally the backtrace using some existing testcases, and
here is the output:
```
▶ python tests/python/unittest/test_target_target.py
Traceback (most recent call last):
File "tests/python/unittest/test_target_target.py", line 229, in <module>
test_target_host_warning()
File "tests/python/unittest/test_target_target.py", line 218, in
test_target_host_warning
tgt = tvm.target.Target("cuda --host nvidia/jetson-nano", "llvm")
File "/home/jrshao/Projects/tvm-dev/python/tvm/target/target.py", line
100, in __init__
self.__init_handle_by_constructor__(
File "/home/jrshao/Projects/tvm-dev/python/tvm/_ffi/_ctypes/object.py",
line 136, in __init_handle_by_constructor__
handle = __init_by_constructor__(fconstructor, args)
File
"/home/jrshao/Projects/tvm-dev/python/tvm/_ffi/_ctypes/packed_func.py", line
260, in __init_handle_by_constructor__
raise get_last_ffi_error()
ValueError: Traceback (most recent call last):
7: TVMFuncCall
at /home/jrshao/Projects/tvm-dev/src/runtime/c_runtime_api.cc:481
6: tvm::runtime::PackedFunc::CallPacked(tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*) const
at
/home/jrshao/Projects/tvm-dev/include/tvm/runtime/packed_func.h:1158
5: std::function<void (tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*)>::operator()(tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*) const
at /usr/include/c++/10/bits/std_function.h:622
4: std::_Function_handler<void (tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*), void (*)(tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*)>::_M_invoke(std::_Any_data const&,
tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&)
at /usr/include/c++/10/bits/std_function.h:291
3: std::enable_if<std::__and_<std::is_void<void>, std::__is_invocable<void
(*&)(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*> >::value, void>::type std::__invoke_r<void, void
(*&)(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*>(void (*&)(tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*), tvm::runtime::TVMArgs&&,
tvm::runtime::TVMRetValue*&&)
at /usr/include/c++/10/bits/invoke.h:153
2: void std::__invoke_impl<void, void (*&)(tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*), tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*>(std::__invoke_other, void
(*&)(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*),
tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&)
at /usr/include/c++/10/bits/invoke.h:60
1: tvm::TargetInternal::ConstructorDispatcher(tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*)
at /home/jrshao/Projects/tvm-dev/src/target/target.cc:471
0: tvm::Target::Target(tvm::Target, tvm::Target)
at /home/jrshao/Projects/tvm-dev/src/target/target.cc:377
File "/home/jrshao/Projects/tvm-dev/src/target/target.cc", line 377
ValueError: Check failed: !n->host.defined() == false: Adding a host to a
target whose host field has been defined
```
Have to say it is really neat! Thank you so much Tristan!
CC: @comaniac @zhiics @yzhliu @icemelon9 @kevinthesun
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]