µtvm debug improvements (#5648)
authorAndrew Reusch <areusch@octoml.ai>
Fri, 22 May 2020 21:00:48 +0000 (14:00 -0700)
committerGitHub <noreply@github.com>
Fri, 22 May 2020 21:00:48 +0000 (14:00 -0700)
commit3e074c5bf029fd4d228737e6bbde5b140f843cd0
treeb66e6868baa6066188a4175228fd43413fa2ece8
parent896557d935999391dcc8bda001fb67d79e2f9ef8
µtvm debug improvements (#5648)

* Forever loop in UTVMDone to aid debugging

* Use parameter and callback function as a micro debug hook.

 * Previously, users had to uncomment a region of code in
   micro_session.cc and recompile to debug. Now they can pass in a
   key in the micro.Session config:

       config = tvm.micro.device....generate_config()
       config['debug_func'] = _python_launch_gdb
       with micro.Session(config) as sess:
         ....

* clang-format

* Only forever loop on device (on host this blocks unittests)
python/tvm/micro/base.py
python/tvm/micro/device/host.py
src/runtime/micro/host_driven/utvm_runtime.c
src/runtime/micro/micro_session.cc
src/runtime/micro/micro_session.h