[Hexagon] RPC server/client for simulator#10361
Conversation
This is the C++ code for running Hexagon code on simulator via the RPC mechanism. It is intended to be integrated into the current HexagonLauncher, although the integration will require further changes to the launcher python code. The final goal is to be able to run the same file.py on either hardware or simulator without needing to edit the python file, but simply by changing the configuration of the execution platform (i.e. something like --exectute-on=simulator as a command line or in an environment variable). The exact details are still to be determined.
|
cc: @mehrdadh |
| # Build X86 binaries: | ||
| # - tvm_rpc_x86 | ||
|
|
||
| ExternalProject_Add(x86_tvm_runtime_rpc |
There was a problem hiding this comment.
Build a cpp RPC server app for x86 with the Hexagon RPC code enabled.
| HEX_VA_t dispatch_v_, message_buffer_v_; | ||
| std::unique_ptr<HexagonWrapper> sim_; | ||
|
|
||
| // Sim configuration routines. |
There was a problem hiding this comment.
All of this configuration code was taken from src/runtime/hexagon/android/sim/hexagon_device_sim.cpp.
There was a problem hiding this comment.
can you move all of these configurations to a header file and reuse it?
There was a problem hiding this comment.
The offload code will be removed, so this will be the only place where it appears. The files in src/runtime/hexagon/android will be deleted.
There was a problem hiding this comment.
@mehrdadh Since the original code will be removed, I think it's fine to merge this as is and let @kparzysz-quic continue completing his work.
| rpc->dispatch_v_ = RssV & ~0u; // ~0u is uint32_t | ||
| rpc->message_buffer_v_ = RssV >> 32; | ||
|
|
||
| LOG(INFO) << "dispatch:" << reinterpret_cast<void*>(rpc->dispatch_v_) |
There was a problem hiding this comment.
DLOG or VLOG (can be done in a follow up)
This is the C++ code for running Hexagon code on simulator via the RPC mechanism. It is intended to be integrated into the current HexagonLauncher, although the integration will require further changes to the launcher python code. The final goal is to be able to run the same file.py on either hardware or simulator without needing to edit the python file, but simply by changing the configuration of the execution platform (i.e. something like --exectute-on=simulator as a command line or in an environment variable). The exact details are still to be determined.
This is the C++ code for running Hexagon code on simulator via the RPC mechanism. It is intended to be integrated into the current
HexagonLauncher, although the integration will require further changes to the launcher python code.The final goal is to be able to run the same file.py on either hardware or simulator without needing to edit the python file, but simply by changing the configuration of the execution platform (i.e. something like
--execute-on=simulatoras a command line or in an environment variable). The exact details are still to be determined.