Skip to content

[Hexagon] Add doc on TVM - Hexagon RPC flow#10507

Merged
kparzysz-quic merged 3 commits into
apache:mainfrom
masahi:tvm-hex-rpc-doc
Mar 11, 2022
Merged

[Hexagon] Add doc on TVM - Hexagon RPC flow#10507
kparzysz-quic merged 3 commits into
apache:mainfrom
masahi:tvm-hex-rpc-doc

Conversation

@masahi

@masahi masahi commented Mar 7, 2022

Copy link
Copy Markdown
Member

Rendered

This PR adds documentation on the complex interaction between TVM and Hexagon RPC.

@kparzysz-quic @mehrdadh @areusch @tmoreau89

@masahi

masahi commented Mar 7, 2022

Copy link
Copy Markdown
Member Author

@kparzysz-quic As my doc shows, LocalSession is not involved in TVM - Hexagon RPC. So we can delete

"${TVMRT_SOURCE_DIR}/rpc/rpc_local_session.cc"

Can I go ahead and do that?

@kparzysz-quic

kparzysz-quic commented Mar 7, 2022

Copy link
Copy Markdown
Contributor

You can try that, but when I did it, it caused failures. Make sure that once you delete it, it still works.

Edit: please check both, hardware and simulator.

Comment thread tests/python/contrib/test_hexagon/README_RPC.md Outdated
@masahi masahi force-pushed the tvm-hex-rpc-doc branch from 1a52a10 to 97cb9ce Compare March 8, 2022 05:14
@masahi

masahi commented Mar 8, 2022

Copy link
Copy Markdown
Member Author

You can try that, but when I did it, it caused failures. Make sure that once you delete it, it still works.

Edit: please check both, hardware and simulator.

Ok, I'll do that later. I wonder why you got the failure. Karl (don't know his github) got a call trace on the Hexagon side which showed:

* thread #2, stop reason = breakpoint 7.1
  * frame #0: 0xfdf4bc30 libhexagon_rpc_skel.so`tvm::runtime::hexagon::HexagonDeviceAPIv2::CopyDataFromTo(DLTensor*, DLTensor*, void*)
    frame #1: 0xfde9b4a4 libhexagon_rpc_skel.so`TVMDeviceCopyDataFromTo + 68
    frame #2: 0xfde78b20 libhexagon_rpc_skel.so`tvm::runtime::MinRPCServer<tvm::runtime::hexagon::HexagonIOHandler>::HandleCopyToRemote() + 272
    frame #3: 0xfde785e4 libhexagon_rpc_skel.so`tvm::runtime::MinRPCServer<tvm::runtime::hexagon::HexagonIOHandler>::ProcessOnePacket() + 212
    frame #4: 0xfde777b8 libhexagon_rpc_skel.so`hexagon_rpc_send + 52
    frame #5: 0x00180970 fastrpc_shell_unsigned_3`mod_table_invoke + 528
    frame #6: 0x00171b6c fastrpc_shell_unsigned_3`fastrpc_invoke_dispatch + 556

So there is no LocalSession involved on the Hexagon side.

@masahi masahi force-pushed the tvm-hex-rpc-doc branch 2 times, most recently from f386dcc to 3b1712c Compare March 8, 2022 18:34
@masahi masahi force-pushed the tvm-hex-rpc-doc branch from 3b1712c to 7cc1952 Compare March 9, 2022 05:47
@masahi

masahi commented Mar 9, 2022

Copy link
Copy Markdown
Member Author

@kparzysz-quic please review

@kparzysz-quic kparzysz-quic merged commit e34985b into apache:main Mar 11, 2022
pfk-beta pushed a commit to pfk-beta/tvm that referenced this pull request Apr 11, 2022
* [Hexagon] Add doc on TVM - Hexagon RPC flow

* updated for the latest code

* add TODO on removing rpc_local_session.cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants