Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Mar 11, 2022

Conversation

masahi
Copy link
Member

@masahi masahi commented Mar 7, 2022

Rendered

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

@kparzysz-quic @mehrdadh @areusch @tmoreau89

@masahi
Copy link
Member Author

masahi commented Mar 7, 2022

@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
Copy link
Contributor

kparzysz-quic commented Mar 7, 2022

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.

@masahi
Copy link
Member Author

masahi commented Mar 8, 2022

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
Copy link
Member Author

masahi commented Mar 9, 2022

@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