MLCompilerBridge
Tools for streamlining communication with ML models for compiler optimizations.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface Class Reference

This class implements methods for communication with compiler using gRPC. More...

Inheritance diagram for compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface:
Inheritance graph
[legend]
Collaboration diagram for compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface:
Collaboration graph
[legend]

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
 

Detailed Description

This class implements methods for communication with compiler using gRPC.

Definition at line 25 of file GrpcCompilerInterface.py.

Constructor & Destructor Documentation

◆ __init__()

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.

Parameters
modeCan be 'client' or 'server'.
stub_classgRPC stub class used in 'client' mode
hostip
hostport
add_server_methodused in 'server' mode
grpc_service_objused in 'server' mode

Reimplemented from compilerinterface.BaseCompilerInterface.BaseCompilerInterface.

Definition at line 33 of file GrpcCompilerInterface.py.

◆ __del__()

compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.__del__ ( self)

Definition at line 59 of file GrpcCompilerInterface.py.

Member Function Documentation

◆ evaluate()

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.

◆ start_server()

compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.start_server ( self)

Starts gRPC server.

Definition at line 68 of file GrpcCompilerInterface.py.

Member Data Documentation

◆ add_server_method

compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.add_server_method

Definition at line 56 of file GrpcCompilerInterface.py.

◆ channel

compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.channel

Definition at line 48 of file GrpcCompilerInterface.py.

◆ grpc_service_obj

compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.grpc_service_obj

Definition at line 55 of file GrpcCompilerInterface.py.

◆ host

compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.host

Definition at line 44 of file GrpcCompilerInterface.py.

◆ mode

compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.mode

Definition at line 43 of file GrpcCompilerInterface.py.

◆ server_port

compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.server_port

Definition at line 45 of file GrpcCompilerInterface.py.

◆ stub

compilerinterface.GrpcCompilerInterface.GrpcCompilerInterface.stub

Definition at line 52 of file GrpcCompilerInterface.py.


The documentation for this class was generated from the following file: