forked from llvm/circt
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ESI Runtime] Replace Cap'nProto with gRPC (llvm#7217)
After spending a truly obnoxious amount of time fighting capnp and libkj, we made the decision to switch to another RPC system. We're no longer modeling and serializing message types in Capnp and we don't need the performance which capnp/libkj RPC promises, so there's really no need for the additional complexity. A slower system which is thread safe should work fine. This commit breaks the build in a pretty horrible way and is not intended to be merged on its own. It simply breaks up the diff.
- Loading branch information
1 parent
50a6dfb
commit 60ec2ac
Showing
29 changed files
with
998 additions
and
1,303 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
//===- cosim.proto - ESI cosim RPC definitions ------------------*- C++ -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// The ESI cosimulation gRPC schema. If something (client or server) wants to | ||
// talk to an ESI runtime, it mergely needs to implement this schema. If | ||
// possible, however, it is encouraged to use the C++ esiruntime API as that is | ||
// expected to be more portable and supports more than just cosim. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
syntax = "proto3"; | ||
|
||
package esi.cosim; | ||
|
||
// Description of a channel that can be connected to by the client. | ||
message ChannelDesc { | ||
string name = 1; | ||
|
||
enum Direction { | ||
TO_SERVER = 0; | ||
TO_CLIENT = 1; | ||
} | ||
Direction dir = 2; | ||
|
||
string type = 3; | ||
} | ||
|
||
// List of channels that the client can connect to. | ||
message ListOfChannels { repeated ChannelDesc channels = 1; } | ||
|
||
// Empty message since gRPC only supports exactly one argument and return. | ||
message VoidMessage {} | ||
|
||
// The manifest package. | ||
message Manifest { | ||
int32 esi_version = 1; | ||
bytes compressed_manifest = 2; | ||
} | ||
|
||
// An ESI message. | ||
message Message { bytes data = 1; } | ||
|
||
// An ESI message and the channel to which is should be directed. | ||
message AddressedMessage { | ||
string channel_name = 1; | ||
Message message = 2; | ||
} | ||
|
||
// The server interface provided by the ESI cosim server. | ||
service ChannelServer { | ||
// Get the manifest embedded in the accelertor. | ||
rpc GetManifest(VoidMessage) returns (Manifest) {} | ||
|
||
// List the channels that the client can connect to. | ||
rpc ListChannels(VoidMessage) returns (ListOfChannels) {} | ||
|
||
// Send a message to the server. | ||
rpc SendToServer(AddressedMessage) returns (VoidMessage) {} | ||
|
||
// Connect to a client channel and return a stream of messages coming from | ||
// that channel. | ||
rpc ConnectToClientChannel(ChannelDesc) returns (stream Message) {} | ||
} |
This file contains 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
Oops, something went wrong.