[Remote 1.3] Add remote runtime#2915
Open
rniczh wants to merge 4 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## rniczh/add-remote-to-llvm #2915 +/- ##
=============================================================
- Coverage 96.90% 96.90% -0.01%
=============================================================
Files 166 166
Lines 19012 19015 +3
Branches 1760 1761 +1
=============================================================
+ Hits 18424 18426 +2
- Misses 433 434 +1
Partials 155 155 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context:
The remote dialect and its
convert-remote-to-llvmlowering emit calls to a set of__catalyst__remote__*symbols, but nothing implements them yet. This PR adds the host-side runtime that backs those symbols.The things we need to have:
Description of the Change:
Adds a new runtime component in
runtime/include/RemoteCAPI.hfor implementing__catalyst__remote__open,__catalyst__remote__send_binary,__catalyst__remote__launch, 1__catalyst__remote__call_wrapperand__catalyst__remote__close()`Two processes, one TCP socket, ORC v2 EPC as the wire protocol. The host running the qjit-compiled program, and the remote catalyst executor process listening on a TCP port. Everything between them is carried by LLVM's ORC JIT v2 EPC protocol.
The host walks through five stages, top to bottom:
Open Sessions. The host connects to one or more executor addresses. Each successful connect produces RemoteSession that owns its half of the EPC channel, its ObjectLinkingLayer, and a 1 GB slab (Currently, we fix it to 1GB) reserved on the remote side. The session also resolves four "exported" symbols from the executor that the rest of the stages will need.
.hsain the future, which is via catalyst_remote_store_asset. The executor writes those to ${tmp}/catalyst-assets/..so, which is used when you need to orchestrate something from the host and require to apply the change on the target device..soare resolved by remote dlsym(RTLD_DEFAULT,...) against the loaded libraries.Benefits:
Possible Drawbacks:
Related GitHub Issues:
[sc-119223]
[sc-119310]