|
MLCompilerBridge
Tools for streamlining communication with ML models for compiler optimizations.
|
This class implements methods for communication with compiler using gRPC. More...


Public Member Functions | |
| __init__ (self, mode, stub_class=None, hostip="127.0.0.1", hostport=50051, add_server_method=None, grpc_service_obj=None) | |
| Initializes GrpcCompilerInterface object. | |
| __del__ (self) | |
| evaluate (self, mode=None) | |
| Sends query to compiler and returns deserialized result. | |
| start_server (self) | |
| Starts gRPC server. | |
Public Member Functions inherited from compilerinterface.BaseCompilerInterface.BaseCompilerInterface | |
| populate_buffer (self, data) | |
| Places data for next request into a buffer after serialization. | |
Public Attributes | |
| mode | |
| host | |
| server_port | |
| channel | |
| stub | |
| grpc_service_obj | |
| add_server_method | |
Public Attributes inherited from compilerinterface.BaseCompilerInterface.BaseCompilerInterface | |
| serdes_obj | |
This class implements methods for communication with compiler using gRPC.
Definition at line 25 of file GrpcCompilerInterface.py.
| compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.__init__ | ( | self, | |
| mode, | |||
| stub_class = None, | |||
| hostip = "127.0.0.1", | |||
| hostport = 50051, | |||
| add_server_method = None, | |||
| grpc_service_obj = None ) |
Initializes GrpcCompilerInterface object.
| mode | Can be 'client' or 'server'. |
| stub_class | gRPC stub class used in 'client' mode |
| hostip | |
| hostport | |
| add_server_method | used in 'server' mode |
| grpc_service_obj | used in 'server' mode |
Reimplemented from compilerinterface.BaseCompilerInterface.BaseCompilerInterface.
Definition at line 33 of file GrpcCompilerInterface.py.
| compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.__del__ | ( | self | ) |
Definition at line 59 of file GrpcCompilerInterface.py.
| compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.evaluate | ( | self, | |
| mode = None ) |
Sends query to compiler and returns deserialized result.
Reimplemented from compilerinterface.BaseCompilerInterface.BaseCompilerInterface.
Definition at line 63 of file GrpcCompilerInterface.py.
| compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.start_server | ( | self | ) |
Starts gRPC server.
Definition at line 68 of file GrpcCompilerInterface.py.
| compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.add_server_method |
Definition at line 56 of file GrpcCompilerInterface.py.
| compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.channel |
Definition at line 48 of file GrpcCompilerInterface.py.
| compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.grpc_service_obj |
Definition at line 55 of file GrpcCompilerInterface.py.
| compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.host |
Definition at line 44 of file GrpcCompilerInterface.py.
| compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.mode |
Definition at line 43 of file GrpcCompilerInterface.py.
| compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.server_port |
Definition at line 45 of file GrpcCompilerInterface.py.
| compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.stub |
Definition at line 52 of file GrpcCompilerInterface.py.