rpc

package
v0.0.0-...-3233e8b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XlaService_Unregister_FullMethodName               = "/xla.XlaService/Unregister"
	XlaService_DeconstructTuple_FullMethodName         = "/xla.XlaService/DeconstructTuple"
	XlaService_Unpack_FullMethodName                   = "/xla.XlaService/Unpack"
	XlaService_GetShape_FullMethodName                 = "/xla.XlaService/GetShape"
	XlaService_GetComputationGraphStats_FullMethodName = "/xla.XlaService/GetComputationGraphStats"
	XlaService_LoadData_FullMethodName                 = "/xla.XlaService/LoadData"
	XlaService_TransferToClient_FullMethodName         = "/xla.XlaService/TransferToClient"
	XlaService_TransferToServer_FullMethodName         = "/xla.XlaService/TransferToServer"
	XlaService_TransferToInfeed_FullMethodName         = "/xla.XlaService/TransferToInfeed"
	XlaService_TransferFromOutfeed_FullMethodName      = "/xla.XlaService/TransferFromOutfeed"
	XlaService_ResetDevice_FullMethodName              = "/xla.XlaService/ResetDevice"
	XlaService_ComputeConstantGraph_FullMethodName     = "/xla.XlaService/ComputeConstantGraph"
	XlaService_GetDeviceHandles_FullMethodName         = "/xla.XlaService/GetDeviceHandles"
	XlaService_CreateChannelHandle_FullMethodName      = "/xla.XlaService/CreateChannelHandle"
	XlaService_Compile_FullMethodName                  = "/xla.XlaService/Compile"
	XlaService_Execute_FullMethodName                  = "/xla.XlaService/Execute"
	XlaService_ExecuteGraphParallel_FullMethodName     = "/xla.XlaService/ExecuteGraphParallel"
	XlaService_WaitForExecution_FullMethodName         = "/xla.XlaService/WaitForExecution"
)

Variables

View Source
var File_tensorflow_compiler_xla_rpc_xla_service_proto protoreflect.FileDescriptor
View Source
var XlaService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "xla.XlaService",
	HandlerType: (*XlaServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Unregister",
			Handler:    _XlaService_Unregister_Handler,
		},
		{
			MethodName: "DeconstructTuple",
			Handler:    _XlaService_DeconstructTuple_Handler,
		},
		{
			MethodName: "Unpack",
			Handler:    _XlaService_Unpack_Handler,
		},
		{
			MethodName: "GetShape",
			Handler:    _XlaService_GetShape_Handler,
		},
		{
			MethodName: "GetComputationGraphStats",
			Handler:    _XlaService_GetComputationGraphStats_Handler,
		},
		{
			MethodName: "LoadData",
			Handler:    _XlaService_LoadData_Handler,
		},
		{
			MethodName: "TransferToClient",
			Handler:    _XlaService_TransferToClient_Handler,
		},
		{
			MethodName: "TransferToServer",
			Handler:    _XlaService_TransferToServer_Handler,
		},
		{
			MethodName: "TransferToInfeed",
			Handler:    _XlaService_TransferToInfeed_Handler,
		},
		{
			MethodName: "TransferFromOutfeed",
			Handler:    _XlaService_TransferFromOutfeed_Handler,
		},
		{
			MethodName: "ResetDevice",
			Handler:    _XlaService_ResetDevice_Handler,
		},
		{
			MethodName: "ComputeConstantGraph",
			Handler:    _XlaService_ComputeConstantGraph_Handler,
		},
		{
			MethodName: "GetDeviceHandles",
			Handler:    _XlaService_GetDeviceHandles_Handler,
		},
		{
			MethodName: "CreateChannelHandle",
			Handler:    _XlaService_CreateChannelHandle_Handler,
		},
		{
			MethodName: "Compile",
			Handler:    _XlaService_Compile_Handler,
		},
		{
			MethodName: "Execute",
			Handler:    _XlaService_Execute_Handler,
		},
		{
			MethodName: "ExecuteGraphParallel",
			Handler:    _XlaService_ExecuteGraphParallel_Handler,
		},
		{
			MethodName: "WaitForExecution",
			Handler:    _XlaService_WaitForExecution_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "tensorflow/compiler/xla/rpc/xla_service.proto",
}

XlaService_ServiceDesc is the grpc.ServiceDesc for XlaService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterXlaServiceServer

func RegisterXlaServiceServer(s grpc.ServiceRegistrar, srv XlaServiceServer)

Types

type UnimplementedXlaServiceServer

type UnimplementedXlaServiceServer struct {
}

UnimplementedXlaServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedXlaServiceServer) Compile

func (UnimplementedXlaServiceServer) Execute

func (UnimplementedXlaServiceServer) GetShape

func (UnimplementedXlaServiceServer) LoadData

func (UnimplementedXlaServiceServer) ResetDevice

func (UnimplementedXlaServiceServer) Unpack

func (UnimplementedXlaServiceServer) Unregister

type UnsafeXlaServiceServer

type UnsafeXlaServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeXlaServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to XlaServiceServer will result in compilation errors.

type XlaServiceClient

type XlaServiceClient interface {
	// Unregisters a global allocation.
	//
	// If the handle given is not currently allocated, a NOT_FOUND status is
	// returned.
	Unregister(ctx context.Context, in *xla.UnregisterRequest, opts ...grpc.CallOption) (*xla.UnregisterResponse, error)
	// Deconstructs a tuple. Returns a newly created GlobalDataHandle for each
	// element in the tuple.
	DeconstructTuple(ctx context.Context, in *xla.DeconstructTupleRequest, opts ...grpc.CallOption) (*xla.DeconstructTupleResponse, error)
	// Unpack requests that a global data handle, with a tuple shape, has global
	// data handles created for each of its constituent members. This is the
	// equivalent of the "destructuring assignment" present in various programming
	// languages.
	Unpack(ctx context.Context, in *xla.UnpackRequest, opts ...grpc.CallOption) (*xla.UnpackResponse, error)
	// Requests the shape of the referenced global data.
	GetShape(ctx context.Context, in *xla.GetShapeRequest, opts ...grpc.CallOption) (*xla.GetShapeResponse, error)
	// Requests the statistics of the given computation.
	GetComputationGraphStats(ctx context.Context, in *xla.ComputationGraphStatsRequest, opts ...grpc.CallOption) (*xla.ComputationStatsResponse, error)
	// Loads a variable number of values with a given element type from ColumnIO.
	LoadData(ctx context.Context, in *xla.LoadDataRequest, opts ...grpc.CallOption) (*xla.LoadDataResponse, error)
	// Transfers the given global data to the client in the form of a Literal.
	TransferToClient(ctx context.Context, in *xla.TransferToClientRequest, opts ...grpc.CallOption) (*xla.TransferToClientResponse, error)
	// Transfers the given literal to the server to be stored in a global
	// allocation, which is returned.
	TransferToServer(ctx context.Context, in *xla.TransferToServerRequest, opts ...grpc.CallOption) (*xla.TransferToServerResponse, error)
	// Transfers the given literal to the Infeed buffer of the device.
	TransferToInfeed(ctx context.Context, in *xla.TransferToInfeedRequest, opts ...grpc.CallOption) (*xla.TransferToInfeedResponse, error)
	// Transferred literal from the Outfeed buffer of the device.
	TransferFromOutfeed(ctx context.Context, in *xla.TransferFromOutfeedRequest, opts ...grpc.CallOption) (*xla.TransferFromOutfeedResponse, error)
	// Resets the device, clearing all existing state on the device.
	ResetDevice(ctx context.Context, in *xla.ResetDeviceRequest, opts ...grpc.CallOption) (*xla.ResetDeviceResponse, error)
	// Computes the value of a constant expression. The request contains the
	// computation graph for the constant expression.
	ComputeConstantGraph(ctx context.Context, in *xla.ComputeConstantGraphRequest, opts ...grpc.CallOption) (*xla.ComputeConstantResponse, error)
	// Requests one or more device handles from the target. The returned device
	// handles can be used to specify the device on which to execute computations
	// or transfer data.
	GetDeviceHandles(ctx context.Context, in *xla.GetDeviceHandlesRequest, opts ...grpc.CallOption) (*xla.GetDeviceHandlesResponse, error)
	// Creates a channel handle that can be used to transfer data between
	// two computations via a pair of Send and Recv instructions.
	CreateChannelHandle(ctx context.Context, in *xla.CreateChannelHandleRequest, opts ...grpc.CallOption) (*xla.CreateChannelHandleResponse, error)
	// Compiles the provided computation into executable. Returns the handle of
	// the executable.
	Compile(ctx context.Context, in *xla.CompileRequest, opts ...grpc.CallOption) (*xla.CompileResponse, error)
	// Invokes the provided executable with the provided global data passed as
	// immutable arguments. The request contains the handle to the executable.
	// Returns global data output and execution timing.
	Execute(ctx context.Context, in *xla.ExecuteRequest, opts ...grpc.CallOption) (*xla.ExecuteResponse, error)
	// Invokes the provided list of computations in parallel with the provided
	// global data for each computation. Returns a list of global data output and
	// execution timing.
	ExecuteGraphParallel(ctx context.Context, in *xla.ExecuteGraphParallelRequest, opts ...grpc.CallOption) (*xla.ExecuteParallelResponse, error)
	// Waits until the given execution (aysnchronously launched) is complete, and
	// returns the global data output.
	WaitForExecution(ctx context.Context, in *xla.WaitForExecutionRequest, opts ...grpc.CallOption) (*xla.WaitForExecutionResponse, error)
}

XlaServiceClient is the client API for XlaService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewXlaServiceClient

func NewXlaServiceClient(cc grpc.ClientConnInterface) XlaServiceClient

type XlaServiceServer

type XlaServiceServer interface {
	// Unregisters a global allocation.
	//
	// If the handle given is not currently allocated, a NOT_FOUND status is
	// returned.
	Unregister(context.Context, *xla.UnregisterRequest) (*xla.UnregisterResponse, error)
	// Deconstructs a tuple. Returns a newly created GlobalDataHandle for each
	// element in the tuple.
	DeconstructTuple(context.Context, *xla.DeconstructTupleRequest) (*xla.DeconstructTupleResponse, error)
	// Unpack requests that a global data handle, with a tuple shape, has global
	// data handles created for each of its constituent members. This is the
	// equivalent of the "destructuring assignment" present in various programming
	// languages.
	Unpack(context.Context, *xla.UnpackRequest) (*xla.UnpackResponse, error)
	// Requests the shape of the referenced global data.
	GetShape(context.Context, *xla.GetShapeRequest) (*xla.GetShapeResponse, error)
	// Requests the statistics of the given computation.
	GetComputationGraphStats(context.Context, *xla.ComputationGraphStatsRequest) (*xla.ComputationStatsResponse, error)
	// Loads a variable number of values with a given element type from ColumnIO.
	LoadData(context.Context, *xla.LoadDataRequest) (*xla.LoadDataResponse, error)
	// Transfers the given global data to the client in the form of a Literal.
	TransferToClient(context.Context, *xla.TransferToClientRequest) (*xla.TransferToClientResponse, error)
	// Transfers the given literal to the server to be stored in a global
	// allocation, which is returned.
	TransferToServer(context.Context, *xla.TransferToServerRequest) (*xla.TransferToServerResponse, error)
	// Transfers the given literal to the Infeed buffer of the device.
	TransferToInfeed(context.Context, *xla.TransferToInfeedRequest) (*xla.TransferToInfeedResponse, error)
	// Transferred literal from the Outfeed buffer of the device.
	TransferFromOutfeed(context.Context, *xla.TransferFromOutfeedRequest) (*xla.TransferFromOutfeedResponse, error)
	// Resets the device, clearing all existing state on the device.
	ResetDevice(context.Context, *xla.ResetDeviceRequest) (*xla.ResetDeviceResponse, error)
	// Computes the value of a constant expression. The request contains the
	// computation graph for the constant expression.
	ComputeConstantGraph(context.Context, *xla.ComputeConstantGraphRequest) (*xla.ComputeConstantResponse, error)
	// Requests one or more device handles from the target. The returned device
	// handles can be used to specify the device on which to execute computations
	// or transfer data.
	GetDeviceHandles(context.Context, *xla.GetDeviceHandlesRequest) (*xla.GetDeviceHandlesResponse, error)
	// Creates a channel handle that can be used to transfer data between
	// two computations via a pair of Send and Recv instructions.
	CreateChannelHandle(context.Context, *xla.CreateChannelHandleRequest) (*xla.CreateChannelHandleResponse, error)
	// Compiles the provided computation into executable. Returns the handle of
	// the executable.
	Compile(context.Context, *xla.CompileRequest) (*xla.CompileResponse, error)
	// Invokes the provided executable with the provided global data passed as
	// immutable arguments. The request contains the handle to the executable.
	// Returns global data output and execution timing.
	Execute(context.Context, *xla.ExecuteRequest) (*xla.ExecuteResponse, error)
	// Invokes the provided list of computations in parallel with the provided
	// global data for each computation. Returns a list of global data output and
	// execution timing.
	ExecuteGraphParallel(context.Context, *xla.ExecuteGraphParallelRequest) (*xla.ExecuteParallelResponse, error)
	// Waits until the given execution (aysnchronously launched) is complete, and
	// returns the global data output.
	WaitForExecution(context.Context, *xla.WaitForExecutionRequest) (*xla.WaitForExecutionResponse, error)
	// contains filtered or unexported methods
}

XlaServiceServer is the server API for XlaService service. All implementations must embed UnimplementedXlaServiceServer for forward compatibility

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL