v0

package
v0.0.0-...-7f4ff7b Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TensorType_DataType_name = map[int32]string{
		0:  "DT_INVALID",
		1:  "DT_FLOAT",
		2:  "DT_DOUBLE",
		3:  "DT_INT32",
		4:  "DT_UINT8",
		5:  "DT_INT16",
		6:  "DT_INT8",
		7:  "DT_STRING",
		8:  "DT_COMPLEX64",
		9:  "DT_INT64",
		10: "DT_BOOL",
		11: "DT_QINT8",
		12: "DT_QUINT8",
		13: "DT_QINT32",
		14: "DT_BFLOAT16",
		15: "DT_QINT16",
		16: "DT_QUINT16",
		17: "DT_UINT16",
		18: "DT_COMPLEX128",
		19: "DT_HALF",
		22: "DT_UINT32",
		23: "DT_UINT64",
	}
	TensorType_DataType_value = map[string]int32{
		"DT_INVALID":    0,
		"DT_FLOAT":      1,
		"DT_DOUBLE":     2,
		"DT_INT32":      3,
		"DT_UINT8":      4,
		"DT_INT16":      5,
		"DT_INT8":       6,
		"DT_STRING":     7,
		"DT_COMPLEX64":  8,
		"DT_INT64":      9,
		"DT_BOOL":       10,
		"DT_QINT8":      11,
		"DT_QUINT8":     12,
		"DT_QINT32":     13,
		"DT_BFLOAT16":   14,
		"DT_QINT16":     15,
		"DT_QUINT16":    16,
		"DT_UINT16":     17,
		"DT_COMPLEX128": 18,
		"DT_HALF":       19,
		"DT_UINT32":     22,
		"DT_UINT64":     23,
	}
)

Enum value maps for TensorType_DataType.

View Source
var ExecutorGroup_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tensorflow_federated.v0.ExecutorGroup",
	HandlerType: (*ExecutorGroupServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetExecutor",
			Handler:    _ExecutorGroup_GetExecutor_Handler,
		},
		{
			MethodName: "CreateValue",
			Handler:    _ExecutorGroup_CreateValue_Handler,
		},
		{
			MethodName: "CreateCall",
			Handler:    _ExecutorGroup_CreateCall_Handler,
		},
		{
			MethodName: "CreateStruct",
			Handler:    _ExecutorGroup_CreateStruct_Handler,
		},
		{
			MethodName: "CreateSelection",
			Handler:    _ExecutorGroup_CreateSelection_Handler,
		},
		{
			MethodName: "Compute",
			Handler:    _ExecutorGroup_Compute_Handler,
		},
		{
			MethodName: "Dispose",
			Handler:    _ExecutorGroup_Dispose_Handler,
		},
		{
			MethodName: "DisposeExecutor",
			Handler:    _ExecutorGroup_DisposeExecutor_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "tensorflow_federated/proto/v0/executor.proto",
}

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

View Source
var File_tensorflow_federated_proto_v0_computation_proto protoreflect.FileDescriptor
View Source
var File_tensorflow_federated_proto_v0_executor_proto protoreflect.FileDescriptor

Functions

func RegisterExecutorGroupServer

func RegisterExecutorGroupServer(s grpc.ServiceRegistrar, srv ExecutorGroupServer)

Types

type AbstractType

type AbstractType struct {

	// The label used to refer to this abstract type within a type signature.
	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	// contains filtered or unexported fields
}

A representation of an abstract type identified by a string label (analogous to "typename T" in C++, with "T" being the label). All occurrences of an abstract type with the same label within a type signature are interpreted as referring to the same concrete type. Abstract types can thus be used to represent templates similar to templates in C++. The label does not have any specific meaning otherwise. Any bijective renaming of all labels within a type signature is semantically a no-op (i.e., the resulting type definition is semantically identical to the original before renaming). The label may be modified by the compiler (e.g., due to naming conflicts). An AbstractType T might be used, for example, to define a signature of a generic aggregation operator as "federated_sum: {T}@clients -> T@server". Concise syntax for examples of abstract types: variations of uppercase "T", e.g., as in "T -> T'".

func (*AbstractType) Descriptor deprecated

func (*AbstractType) Descriptor() ([]byte, []int)

Deprecated: Use AbstractType.ProtoReflect.Descriptor instead.

func (*AbstractType) GetLabel

func (x *AbstractType) GetLabel() string

func (*AbstractType) ProtoMessage

func (*AbstractType) ProtoMessage()

func (*AbstractType) ProtoReflect

func (x *AbstractType) ProtoReflect() protoreflect.Message

func (*AbstractType) Reset

func (x *AbstractType) Reset()

func (*AbstractType) String

func (x *AbstractType) String() string

type Block

type Block struct {

	// One or more locals defined within the block, each associating a name with a
	// computation. Computations, whether those associated with the locals, or
	// that associated with the result below, can contain references to names
	// defined earlier, here or in the surrounding context. Self-references are
	// prohibited. All names introduced here must be different. Since execution
	// semantics at this level is purely functional without side effects, the
	// ordering in which the locals are declared is not significant, as it is only
	// the dependencies between the computations that effectively determine the
	// causal relationships that constrain the order of execution.
	//
	// Blocks can be nested, just as lambdas, and the same name scoping rules
	// apply, i.e., blocks (or lambdas) contained within an embedded computation,
	// whether in a local or in the result, are allowed to refer to names defined
	// in an outer lambda or block (unless obscured by a nested declaration).
	// If names defined in the outer context conflict with those defined in the
	// inner congtext (here), the inner names hide outer names in the context in
	// which they are defined. Thus, for example, in "x -> let x=1, y=x+1 in y",
	// the "x=1" would hide the lambda parameter, and therefore "y=x+1" would
	// refer to the inner "x".
	Local []*Block_Local `protobuf:"bytes,1,rep,name=local,proto3" json:"local,omitempty"`
	// The result computation. Always required. The computation typically refers
	// to locals defined above by name, just like the result in a lambda.
	Result *Computation `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

A representation of a body of computation logic broken down into a sequence of local definitions that gradually build up towards a single final result expression. A block defines a sequence of local names, each associated with a computation. Computations associated with names introduced later can refer to names introduced earlier. At the end of a block is a single result computation defined in terms of those locals. It is similar to LET* in LISP.

The intended usage of this abstraction is to break down complex processing into simpler, smaller, easier to understand units that are easier to work with in this broken-down representation, as opposed to a single monolithic complex expression. We expect it to be used, e.g., to represent top-level federated orchestration logic.

A block is technically a redundant abstraction, as it can be equivalently represented using lambda expressions. For example, a simple block of the form "let x=y in z" is equivalent to "(x->z)(y)". Larger blocks can likewise be represented similarly as nested lambdas. The main purpose of introducing this abstraction is simplicity. While expressible via lambdas, a sequential representation is preferred over nested lambdas as it is more readable and easier to debug, and more closely matches how code is expected to be executed by a runtime environment, in which higher-order functions may be unsupported.

One way to think of blocks is as a generalization of a GraphDef, and such, a mechanism for constructing data flow graphs that can include TensorFlow blocks and various federated communication operators as processing nodes. Indeed, this is the primary intended usage of blocks. In this interpretation a block can be thought of as a direct acyclic graph, with the locals and the result being the graph "nodes". Locals represent various partial results computed along the way, and the result is the "op" that represents the output. Each node has associated with it an expression (computation) that specifies how to derive its value from the values represented by other nodes referenced by name. The presence of such reference to one node's name inside another node's expression (computation) can be interpreted as a dependency edge in a data flow graph. Indeed, the data flow interpretation corresponds to the manner in which processing is expected to flow.

Concise syntax: "let name_1=comp_1, ...., name_k=comp_k in comp" with "name_k" and "comp_k" representing the names of the locals, and computations that compute the results that those names represent. For example, a complex expression "x[0](x[1])" can be represented in a slightly more expanded form as "let f=x[0], v=[1] in f(v)".

func (*Block) Descriptor deprecated

func (*Block) Descriptor() ([]byte, []int)

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetLocal

func (x *Block) GetLocal() []*Block_Local

func (*Block) GetResult

func (x *Block) GetResult() *Computation

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

func (x *Block) ProtoReflect() protoreflect.Message

func (*Block) Reset

func (x *Block) Reset()

func (*Block) String

func (x *Block) String() string

type Block_Local

type Block_Local struct {
	Name  string       `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value *Computation `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Block_Local) Descriptor deprecated

func (*Block_Local) Descriptor() ([]byte, []int)

Deprecated: Use Block_Local.ProtoReflect.Descriptor instead.

func (*Block_Local) GetName

func (x *Block_Local) GetName() string

func (*Block_Local) GetValue

func (x *Block_Local) GetValue() *Computation

func (*Block_Local) ProtoMessage

func (*Block_Local) ProtoMessage()

func (*Block_Local) ProtoReflect

func (x *Block_Local) ProtoReflect() protoreflect.Message

func (*Block_Local) Reset

func (x *Block_Local) Reset()

func (*Block_Local) String

func (x *Block_Local) String() string

type Call

type Call struct {

	// A computation that represents the function to call. The value that this
	// represents must be of a functional type.
	Function *Computation `protobuf:"bytes,1,opt,name=function,proto3" json:"function,omitempty"`
	// A computation that represents the argument to the function specified above.
	// Present if and only if "function" declares a parameter. Must match the
	// function's parameter type (i.e., the function's parameter type must be
	// assignable from the argument type).
	Argument *Computation `protobuf:"bytes,2,opt,name=argument,proto3" json:"argument,omitempty"`
	// contains filtered or unexported fields
}

A representation of a function call.

The concise notation for function calls is "f(x)" or "f()", where "f" is the function, and "x" is the optional argument.

func (*Call) Descriptor deprecated

func (*Call) Descriptor() ([]byte, []int)

Deprecated: Use Call.ProtoReflect.Descriptor instead.

func (*Call) GetArgument

func (x *Call) GetArgument() *Computation

func (*Call) GetFunction

func (x *Call) GetFunction() *Computation

func (*Call) ProtoMessage

func (*Call) ProtoMessage()

func (*Call) ProtoReflect

func (x *Call) ProtoReflect() protoreflect.Message

func (*Call) Reset

func (x *Call) Reset()

func (*Call) String

func (x *Call) String() string

type Cardinality

type Cardinality struct {
	Placement   *Placement `protobuf:"bytes,1,opt,name=placement,proto3" json:"placement,omitempty"`
	Cardinality int32      `protobuf:"varint,2,opt,name=cardinality,proto3" json:"cardinality,omitempty"`
	// contains filtered or unexported fields
}

func (*Cardinality) Descriptor deprecated

func (*Cardinality) Descriptor() ([]byte, []int)

Deprecated: Use Cardinality.ProtoReflect.Descriptor instead.

func (*Cardinality) GetCardinality

func (x *Cardinality) GetCardinality() int32

func (*Cardinality) GetPlacement

func (x *Cardinality) GetPlacement() *Placement

func (*Cardinality) ProtoMessage

func (*Cardinality) ProtoMessage()

func (*Cardinality) ProtoReflect

func (x *Cardinality) ProtoReflect() protoreflect.Message

func (*Cardinality) Reset

func (x *Cardinality) Reset()

func (*Cardinality) String

func (x *Cardinality) String() string

type Computation

type Computation struct {

	// The type of what's represented by this structure, which may be functional
	// or non-functional. If it is a TensorFlow block or a lambda expression,
	// the type will be functional. If it is a Struct, or a Call that returns a
	// tensor or a Struct in the result, the type will be non-functional.
	//
	// A Call is a typical way to represent an invocation of a top-level federated
	// computation with all its parameters fully specified. Thus, a top-level
	// computation with all of its parameters filled in may have a non-functional
	// type (the same as type of the result it computes). The illustrative
	// example to think of is "(x -> x + 10)(20)", the type of which is an int, a
	// non-functional type. If a top-level federated computation has all of its
	// parameters filled in, it will assume a similar form.
	Type *Type `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// The specification of the computation to perform.
	//
	// A hypothetical example of a federated computation definition in Python,
	// expressed in a yet-to-be-defined syntax, might translate into definitions
	// in a serialized form as shown below.
	//
	// @tff.computation
	// def fed_eval(model):
	//
	//   @tfe.defun
	//   def local_eval(model):
	//     ...
	//     return {'loss': ..., 'accuracy': ...}
	//
	//   client_model = tff.federated_broadcast(model)
	//   client_metrics = tff.federated_map(local_eval, client_model)
	//   return tff.federated_mean(client_metrics)
	//
	//
	// fed_eval = Computation(lambda=Lambda(
	//     parameter_name='model',
	//     result=Computation(block=Block(
	//         local=[
	//             Block.Local(name='local_eval', value=Computation(
	//                 tensorflow=TensorFlow(...))),
	//             Block.Local(name='client_model', value=Computation(
	//                 call=Call(
	//                     function=Computation(
	//                         intrinsic=Intrinsic(uri='federated_broadcast')),
	//                     argument=Computation(
	//                         reference=Reference(name='model'))))),
	//             Block.Local(name='client_metrics', value=Computation(
	//                 call=Call(
	//                     function=Computation(
	//                         intrinsic=Intrinsic(uri='federated_map')),
	//                     argument=Computation(
	//                         struct=Struct(element=[
	//                             Struct.Element(
	//                                 value=Computation(
	//                                     reference=Reference(
	//                                         name='local_eval'))),
	//                             Struct.Element(
	//                                 value=Computation(
	//                                     reference=Reference(
	//                                         name='local_client_model')))
	//                         ])))))],
	//         result=Computation(
	//             call=Call(
	//                 function=Computation(
	//                     intrinsic=Intrinsic(uri='federated_mean')),
	//                 argument=Computation(
	//                     reference=Reference(name='client_metrics'))))))))
	//
	//
	// Types that are assignable to Computation:
	//	*Computation_Tensorflow
	//	*Computation_Intrinsic
	//	*Computation_Data
	//	*Computation_Lambda
	//	*Computation_Block
	//	*Computation_Reference
	//	*Computation_Call
	//	*Computation_Struct
	//	*Computation_Selection
	//	*Computation_Placement
	//	*Computation_Xla
	Computation isComputation_Computation `protobuf_oneof:"computation"`
	// contains filtered or unexported fields
}

A core data structure that contains a serialized representation of a unit of processing to perform by the TensorFlow Federated framework. This data structure is the primary unit of composition and the means by which we represent, store, and exchange federated computations and their constituents between system components. It is the lowest and smallest programmable abstraction layer that a range of higher-level APIs will be layered upon, structured around the minimum set of concepts and abstractions that provide a level of expressiveness sufficient to efficiently support current and anticipated uses. This layer is not intended for consumption by most users.

In its most general sense, an instance of a Computation as defined here is simply an expression that produces a certain value. The structure of this expression, typically nested, determines how this value is intended to be computed (hence the term "computation"). We may use terms "expression" and "computation" interchangeably in this and other files, although technically, the term "computation" refers to a process, whereas "expression" refers to a specification of that process.

func (*Computation) Descriptor deprecated

func (*Computation) Descriptor() ([]byte, []int)

Deprecated: Use Computation.ProtoReflect.Descriptor instead.

func (*Computation) GetBlock

func (x *Computation) GetBlock() *Block

func (*Computation) GetCall

func (x *Computation) GetCall() *Call

func (*Computation) GetComputation

func (m *Computation) GetComputation() isComputation_Computation

func (*Computation) GetData

func (x *Computation) GetData() *Data

func (*Computation) GetIntrinsic

func (x *Computation) GetIntrinsic() *Intrinsic

func (*Computation) GetLambda

func (x *Computation) GetLambda() *Lambda

func (*Computation) GetPlacement

func (x *Computation) GetPlacement() *Placement

func (*Computation) GetReference

func (x *Computation) GetReference() *Reference

func (*Computation) GetSelection

func (x *Computation) GetSelection() *Selection

func (*Computation) GetStruct

func (x *Computation) GetStruct() *Struct

func (*Computation) GetTensorflow

func (x *Computation) GetTensorflow() *TensorFlow

func (*Computation) GetType

func (x *Computation) GetType() *Type

func (*Computation) GetXla

func (x *Computation) GetXla() *Xla

func (*Computation) ProtoMessage

func (*Computation) ProtoMessage()

func (*Computation) ProtoReflect

func (x *Computation) ProtoReflect() protoreflect.Message

func (*Computation) Reset

func (x *Computation) Reset()

func (*Computation) String

func (x *Computation) String() string

type Computation_Block

type Computation_Block struct {
	// A block of computation logic, i.e., a series of expressions that refer
	// to one-another. This mechanism is intended as a primary means of
	// breaking down longer sequences of processing into simpler parts. A block
	// can have a functional or a non-functional type (matching the type of its
	// result), as it is primarily a mechanism for organizing code.
	Block *Block `protobuf:"bytes,5,opt,name=block,proto3,oneof"`
}

type Computation_Call

type Computation_Call struct {
	// A function call is the primary means of using lambdas, TensorFlow blocks,
	// and other types of functional constructs to compute a specific result in
	// a concrete context. The type of the call is the same as the type of the
	// result of the function being called, i.e., a call with parameter of type
	// T to a function of type T -> T' has type T'.
	Call *Call `protobuf:"bytes,7,opt,name=call,proto3,oneof"`
}

type Computation_Data

type Computation_Data struct {
	// An external source of data to be used by a computation.
	Data *Data `protobuf:"bytes,10,opt,name=data,proto3,oneof"`
}

type Computation_Intrinsic

type Computation_Intrinsic struct {
	// A built-in federated communication operator such as broadcast, federated
	// sum, etc., or one of the custom operators added to the framework, and
	// recognized by the compiler pipeline. Intrinsics have functional types,
	// and most are defined as templates that can opperate on abstract types,
	// and/or federated values with arbitrary placements.
	Intrinsic *Intrinsic `protobuf:"bytes,3,opt,name=intrinsic,proto3,oneof"`
}

type Computation_Lambda

type Computation_Lambda struct {
	// A lambda expression is the primary means of defining new parameterized
	// computations. lambdas always have functional types.
	Lambda *Lambda `protobuf:"bytes,4,opt,name=lambda,proto3,oneof"`
}

type Computation_Placement

type Computation_Placement struct {
	// A placement literal.
	Placement *Placement `protobuf:"bytes,11,opt,name=placement,proto3,oneof"`
}

type Computation_Reference

type Computation_Reference struct {
	// A reference to a name defined in a surrounding context, such as a Lambda
	// or a Block, with the usual scoping rules (the name refers to the
	// innermost scope in which it is defined). Always matches the type of the
	// the parameter it references, i.e., T if the type of the lambda is T->T'.
	// For example, in a Lambda "x : int -> foo(x)", which associates locally
	// name "x" with its parameter, the reference to "x" will be of type "int",
	// just as the parameter of the lambda in which the name "x" is defined.
	Reference *Reference `protobuf:"bytes,6,opt,name=reference,proto3,oneof"`
}

type Computation_Selection

type Computation_Selection struct {
	// A selection by name or index from the result of another expression that
	// returns a Struct. The type of the selection matches the type of the
	// Struct element being selected (known statically, as the name or index is
	// known statically, rather than computed).
	//
	// Note: In higher layers of the API, we will offer convenience mechanisms
	// such as selection from a federated type. For example, if "x" is of a
	// federated type "{<foo=int, bar=string>}@clients", we will allow notation
	// such as "x.foo" as a convenient shortcut for a pointwise selection that
	// might be written as "federated_map(x, y->y.foo)" in a more complete form
	// even though "x" is technically not a Struct. Here at the level of
	// the Computation proto, however, we will represent computations in their
	// fully fleshed-out form, with map and other implicit operators already
	// injected at construction time by the framework as it translates a Python
	// source cosde that defines a computation into this serialized form.
	Selection *Selection `protobuf:"bytes,9,opt,name=selection,proto3,oneof"`
}

type Computation_Struct

type Computation_Struct struct {
	// A struct is explicitly constructed from individual member values.
	Struct *Struct `protobuf:"bytes,8,opt,name=struct,proto3,oneof"`
}

type Computation_Tensorflow

type Computation_Tensorflow struct {
	// TensorFlow computation. TensorFlow computations have functional type
	// signatures that cannot contain FederatedTypes, as they execute locally.
	// In order to construct a TensorFlow computation that maps a federated
	// value pointwise, one must use a federated map intrinsic (to be defined).
	Tensorflow *TensorFlow `protobuf:"bytes,2,opt,name=tensorflow,proto3,oneof"`
}

type Computation_Xla

type Computation_Xla struct {
	// A local (non-federated) computation expressed in XLA. XLA computations
	// have functional type signatures, and are used in a manner similar to
	// local computations expressed in TensorFlow. However, not all types of
	// TensorFlow computations are expressible in XLA (see below for the list
	// of current limitations).
	Xla *Xla `protobuf:"bytes,12,opt,name=xla,proto3,oneof"`
}

type ComputeRequest

type ComputeRequest struct {
	ValueRef *ValueRef   `protobuf:"bytes,1,opt,name=value_ref,json=valueRef,proto3" json:"value_ref,omitempty"`
	Executor *ExecutorId `protobuf:"bytes,2,opt,name=executor,proto3" json:"executor,omitempty"`
	// contains filtered or unexported fields
}

func (*ComputeRequest) Descriptor deprecated

func (*ComputeRequest) Descriptor() ([]byte, []int)

Deprecated: Use ComputeRequest.ProtoReflect.Descriptor instead.

func (*ComputeRequest) GetExecutor

func (x *ComputeRequest) GetExecutor() *ExecutorId

func (*ComputeRequest) GetValueRef

func (x *ComputeRequest) GetValueRef() *ValueRef

func (*ComputeRequest) ProtoMessage

func (*ComputeRequest) ProtoMessage()

func (*ComputeRequest) ProtoReflect

func (x *ComputeRequest) ProtoReflect() protoreflect.Message

func (*ComputeRequest) Reset

func (x *ComputeRequest) Reset()

func (*ComputeRequest) String

func (x *ComputeRequest) String() string

type ComputeResponse

type ComputeResponse struct {
	Value *Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*ComputeResponse) Descriptor deprecated

func (*ComputeResponse) Descriptor() ([]byte, []int)

Deprecated: Use ComputeResponse.ProtoReflect.Descriptor instead.

func (*ComputeResponse) GetValue

func (x *ComputeResponse) GetValue() *Value

func (*ComputeResponse) ProtoMessage

func (*ComputeResponse) ProtoMessage()

func (*ComputeResponse) ProtoReflect

func (x *ComputeResponse) ProtoReflect() protoreflect.Message

func (*ComputeResponse) Reset

func (x *ComputeResponse) Reset()

func (*ComputeResponse) String

func (x *ComputeResponse) String() string

type CreateCallRequest

type CreateCallRequest struct {

	// A reference to the function to be called (which must be obtained from a
	// prior call to `CreateValue()`).
	FunctionRef *ValueRef `protobuf:"bytes,1,opt,name=function_ref,json=functionRef,proto3" json:"function_ref,omitempty"`
	// An optional argument, only for functions that declare an argument.
	ArgumentRef *ValueRef   `protobuf:"bytes,2,opt,name=argument_ref,json=argumentRef,proto3" json:"argument_ref,omitempty"`
	Executor    *ExecutorId `protobuf:"bytes,3,opt,name=executor,proto3" json:"executor,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateCallRequest) Descriptor deprecated

func (*CreateCallRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateCallRequest.ProtoReflect.Descriptor instead.

func (*CreateCallRequest) GetArgumentRef

func (x *CreateCallRequest) GetArgumentRef() *ValueRef

func (*CreateCallRequest) GetExecutor

func (x *CreateCallRequest) GetExecutor() *ExecutorId

func (*CreateCallRequest) GetFunctionRef

func (x *CreateCallRequest) GetFunctionRef() *ValueRef

func (*CreateCallRequest) ProtoMessage

func (*CreateCallRequest) ProtoMessage()

func (*CreateCallRequest) ProtoReflect

func (x *CreateCallRequest) ProtoReflect() protoreflect.Message

func (*CreateCallRequest) Reset

func (x *CreateCallRequest) Reset()

func (*CreateCallRequest) String

func (x *CreateCallRequest) String() string

type CreateCallResponse

type CreateCallResponse struct {
	ValueRef *ValueRef `protobuf:"bytes,1,opt,name=value_ref,json=valueRef,proto3" json:"value_ref,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateCallResponse) Descriptor deprecated

func (*CreateCallResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateCallResponse.ProtoReflect.Descriptor instead.

func (*CreateCallResponse) GetValueRef

func (x *CreateCallResponse) GetValueRef() *ValueRef

func (*CreateCallResponse) ProtoMessage

func (*CreateCallResponse) ProtoMessage()

func (*CreateCallResponse) ProtoReflect

func (x *CreateCallResponse) ProtoReflect() protoreflect.Message

func (*CreateCallResponse) Reset

func (x *CreateCallResponse) Reset()

func (*CreateCallResponse) String

func (x *CreateCallResponse) String() string

type CreateSelectionRequest

type CreateSelectionRequest struct {
	SourceRef *ValueRef   `protobuf:"bytes,1,opt,name=source_ref,json=sourceRef,proto3" json:"source_ref,omitempty"`
	Index     int32       `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
	Executor  *ExecutorId `protobuf:"bytes,4,opt,name=executor,proto3" json:"executor,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSelectionRequest) Descriptor deprecated

func (*CreateSelectionRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateSelectionRequest.ProtoReflect.Descriptor instead.

func (*CreateSelectionRequest) GetExecutor

func (x *CreateSelectionRequest) GetExecutor() *ExecutorId

func (*CreateSelectionRequest) GetIndex

func (x *CreateSelectionRequest) GetIndex() int32

func (*CreateSelectionRequest) GetSourceRef

func (x *CreateSelectionRequest) GetSourceRef() *ValueRef

func (*CreateSelectionRequest) ProtoMessage

func (*CreateSelectionRequest) ProtoMessage()

func (*CreateSelectionRequest) ProtoReflect

func (x *CreateSelectionRequest) ProtoReflect() protoreflect.Message

func (*CreateSelectionRequest) Reset

func (x *CreateSelectionRequest) Reset()

func (*CreateSelectionRequest) String

func (x *CreateSelectionRequest) String() string

type CreateSelectionResponse

type CreateSelectionResponse struct {
	ValueRef *ValueRef `protobuf:"bytes,1,opt,name=value_ref,json=valueRef,proto3" json:"value_ref,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSelectionResponse) Descriptor deprecated

func (*CreateSelectionResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateSelectionResponse.ProtoReflect.Descriptor instead.

func (*CreateSelectionResponse) GetValueRef

func (x *CreateSelectionResponse) GetValueRef() *ValueRef

func (*CreateSelectionResponse) ProtoMessage

func (*CreateSelectionResponse) ProtoMessage()

func (*CreateSelectionResponse) ProtoReflect

func (x *CreateSelectionResponse) ProtoReflect() protoreflect.Message

func (*CreateSelectionResponse) Reset

func (x *CreateSelectionResponse) Reset()

func (*CreateSelectionResponse) String

func (x *CreateSelectionResponse) String() string

type CreateStructRequest

type CreateStructRequest struct {
	Element  []*CreateStructRequest_Element `protobuf:"bytes,1,rep,name=element,proto3" json:"element,omitempty"`
	Executor *ExecutorId                    `protobuf:"bytes,3,opt,name=executor,proto3" json:"executor,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateStructRequest) Descriptor deprecated

func (*CreateStructRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateStructRequest.ProtoReflect.Descriptor instead.

func (*CreateStructRequest) GetElement

func (*CreateStructRequest) GetExecutor

func (x *CreateStructRequest) GetExecutor() *ExecutorId

func (*CreateStructRequest) ProtoMessage

func (*CreateStructRequest) ProtoMessage()

func (*CreateStructRequest) ProtoReflect

func (x *CreateStructRequest) ProtoReflect() protoreflect.Message

func (*CreateStructRequest) Reset

func (x *CreateStructRequest) Reset()

func (*CreateStructRequest) String

func (x *CreateStructRequest) String() string

type CreateStructRequest_Element

type CreateStructRequest_Element struct {
	Name     string    `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	ValueRef *ValueRef `protobuf:"bytes,2,opt,name=value_ref,json=valueRef,proto3" json:"value_ref,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateStructRequest_Element) Descriptor deprecated

func (*CreateStructRequest_Element) Descriptor() ([]byte, []int)

Deprecated: Use CreateStructRequest_Element.ProtoReflect.Descriptor instead.

func (*CreateStructRequest_Element) GetName

func (x *CreateStructRequest_Element) GetName() string

func (*CreateStructRequest_Element) GetValueRef

func (x *CreateStructRequest_Element) GetValueRef() *ValueRef

func (*CreateStructRequest_Element) ProtoMessage

func (*CreateStructRequest_Element) ProtoMessage()

func (*CreateStructRequest_Element) ProtoReflect

func (*CreateStructRequest_Element) Reset

func (x *CreateStructRequest_Element) Reset()

func (*CreateStructRequest_Element) String

func (x *CreateStructRequest_Element) String() string

type CreateStructResponse

type CreateStructResponse struct {
	ValueRef *ValueRef `protobuf:"bytes,1,opt,name=value_ref,json=valueRef,proto3" json:"value_ref,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateStructResponse) Descriptor deprecated

func (*CreateStructResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateStructResponse.ProtoReflect.Descriptor instead.

func (*CreateStructResponse) GetValueRef

func (x *CreateStructResponse) GetValueRef() *ValueRef

func (*CreateStructResponse) ProtoMessage

func (*CreateStructResponse) ProtoMessage()

func (*CreateStructResponse) ProtoReflect

func (x *CreateStructResponse) ProtoReflect() protoreflect.Message

func (*CreateStructResponse) Reset

func (x *CreateStructResponse) Reset()

func (*CreateStructResponse) String

func (x *CreateStructResponse) String() string

type CreateValueRequest

type CreateValueRequest struct {
	Value    *Value      `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	Executor *ExecutorId `protobuf:"bytes,2,opt,name=executor,proto3" json:"executor,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateValueRequest) Descriptor deprecated

func (*CreateValueRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateValueRequest.ProtoReflect.Descriptor instead.

func (*CreateValueRequest) GetExecutor

func (x *CreateValueRequest) GetExecutor() *ExecutorId

func (*CreateValueRequest) GetValue

func (x *CreateValueRequest) GetValue() *Value

func (*CreateValueRequest) ProtoMessage

func (*CreateValueRequest) ProtoMessage()

func (*CreateValueRequest) ProtoReflect

func (x *CreateValueRequest) ProtoReflect() protoreflect.Message

func (*CreateValueRequest) Reset

func (x *CreateValueRequest) Reset()

func (*CreateValueRequest) String

func (x *CreateValueRequest) String() string

type CreateValueResponse

type CreateValueResponse struct {
	ValueRef *ValueRef `protobuf:"bytes,1,opt,name=value_ref,json=valueRef,proto3" json:"value_ref,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateValueResponse) Descriptor deprecated

func (*CreateValueResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateValueResponse.ProtoReflect.Descriptor instead.

func (*CreateValueResponse) GetValueRef

func (x *CreateValueResponse) GetValueRef() *ValueRef

func (*CreateValueResponse) ProtoMessage

func (*CreateValueResponse) ProtoMessage()

func (*CreateValueResponse) ProtoReflect

func (x *CreateValueResponse) ProtoReflect() protoreflect.Message

func (*CreateValueResponse) Reset

func (x *CreateValueResponse) Reset()

func (*CreateValueResponse) String

func (x *CreateValueResponse) String() string

type Data

type Data struct {

	// Types that are assignable to Data:
	//	*Data_Uri
	Data isData_Data `protobuf_oneof:"data"`
	// contains filtered or unexported fields
}

A specification of an external source of data to be used by a computation.

Data streams are curently expected to always be nested structures composed of sequences, Structs, and tensor types. Sequences cannot be nested. Structs may appear at the outer level (to return multiple sequences, e.g., training and testing samples), or at the element level (if sequences contain structured elements, e.g., examples already parsed into individual features).

Although data could conceivably be modeled via intrinsics, we factor it out to more conveniently express various types of input pipelines without having to pack everything into a URI. Sources of data could include training examples emitted by a mobile app, files on a filesystem, data to obtain from a location on the web, etc., and the specification, in addition to the origin of the data, could include things like example selection criteria, data decoding or simple transformations. For now, this structure is simply a URI to be interpreted by the runtime environment. To be extended as needed.

func (*Data) Descriptor deprecated

func (*Data) Descriptor() ([]byte, []int)

Deprecated: Use Data.ProtoReflect.Descriptor instead.

func (*Data) GetData

func (m *Data) GetData() isData_Data

func (*Data) GetUri

func (x *Data) GetUri() string

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) ProtoReflect

func (x *Data) ProtoReflect() protoreflect.Message

func (*Data) Reset

func (x *Data) Reset()

func (*Data) String

func (x *Data) String() string

type Data_Uri

type Data_Uri struct {
	// A specification of the data stream as a URI to be interpreted by the
	// environment.
	Uri string `protobuf:"bytes,1,opt,name=uri,proto3,oneof"`
}

type DisposeExecutorRequest

type DisposeExecutorRequest struct {
	Executor *ExecutorId `protobuf:"bytes,1,opt,name=executor,proto3" json:"executor,omitempty"`
	// contains filtered or unexported fields
}

func (*DisposeExecutorRequest) Descriptor deprecated

func (*DisposeExecutorRequest) Descriptor() ([]byte, []int)

Deprecated: Use DisposeExecutorRequest.ProtoReflect.Descriptor instead.

func (*DisposeExecutorRequest) GetExecutor

func (x *DisposeExecutorRequest) GetExecutor() *ExecutorId

func (*DisposeExecutorRequest) ProtoMessage

func (*DisposeExecutorRequest) ProtoMessage()

func (*DisposeExecutorRequest) ProtoReflect

func (x *DisposeExecutorRequest) ProtoReflect() protoreflect.Message

func (*DisposeExecutorRequest) Reset

func (x *DisposeExecutorRequest) Reset()

func (*DisposeExecutorRequest) String

func (x *DisposeExecutorRequest) String() string

type DisposeExecutorResponse

type DisposeExecutorResponse struct {
	// contains filtered or unexported fields
}

func (*DisposeExecutorResponse) Descriptor deprecated

func (*DisposeExecutorResponse) Descriptor() ([]byte, []int)

Deprecated: Use DisposeExecutorResponse.ProtoReflect.Descriptor instead.

func (*DisposeExecutorResponse) ProtoMessage

func (*DisposeExecutorResponse) ProtoMessage()

func (*DisposeExecutorResponse) ProtoReflect

func (x *DisposeExecutorResponse) ProtoReflect() protoreflect.Message

func (*DisposeExecutorResponse) Reset

func (x *DisposeExecutorResponse) Reset()

func (*DisposeExecutorResponse) String

func (x *DisposeExecutorResponse) String() string

type DisposeRequest

type DisposeRequest struct {
	ValueRef []*ValueRef `protobuf:"bytes,1,rep,name=value_ref,json=valueRef,proto3" json:"value_ref,omitempty"`
	Executor *ExecutorId `protobuf:"bytes,2,opt,name=executor,proto3" json:"executor,omitempty"`
	// contains filtered or unexported fields
}

func (*DisposeRequest) Descriptor deprecated

func (*DisposeRequest) Descriptor() ([]byte, []int)

Deprecated: Use DisposeRequest.ProtoReflect.Descriptor instead.

func (*DisposeRequest) GetExecutor

func (x *DisposeRequest) GetExecutor() *ExecutorId

func (*DisposeRequest) GetValueRef

func (x *DisposeRequest) GetValueRef() []*ValueRef

func (*DisposeRequest) ProtoMessage

func (*DisposeRequest) ProtoMessage()

func (*DisposeRequest) ProtoReflect

func (x *DisposeRequest) ProtoReflect() protoreflect.Message

func (*DisposeRequest) Reset

func (x *DisposeRequest) Reset()

func (*DisposeRequest) String

func (x *DisposeRequest) String() string

type DisposeResponse

type DisposeResponse struct {
	// contains filtered or unexported fields
}

func (*DisposeResponse) Descriptor deprecated

func (*DisposeResponse) Descriptor() ([]byte, []int)

Deprecated: Use DisposeResponse.ProtoReflect.Descriptor instead.

func (*DisposeResponse) ProtoMessage

func (*DisposeResponse) ProtoMessage()

func (*DisposeResponse) ProtoReflect

func (x *DisposeResponse) ProtoReflect() protoreflect.Message

func (*DisposeResponse) Reset

func (x *DisposeResponse) Reset()

func (*DisposeResponse) String

func (x *DisposeResponse) String() string

type ExecutorGroupClient

type ExecutorGroupClient interface {
	// Returns a
	GetExecutor(ctx context.Context, in *GetExecutorRequest, opts ...grpc.CallOption) (*GetExecutorResponse, error)
	// Creates a value in the executor and returns a reference to it that can be
	// supplied as an argument to other methods.
	CreateValue(ctx context.Context, in *CreateValueRequest, opts ...grpc.CallOption) (*CreateValueResponse, error)
	// Creates a call in the executor and returns a reference to the result.
	CreateCall(ctx context.Context, in *CreateCallRequest, opts ...grpc.CallOption) (*CreateCallResponse, error)
	// Creates a struct of values in the executor and returns a reference to it.
	CreateStruct(ctx context.Context, in *CreateStructRequest, opts ...grpc.CallOption) (*CreateStructResponse, error)
	// Creates a selection from an executor value and returns a reference to it.
	CreateSelection(ctx context.Context, in *CreateSelectionRequest, opts ...grpc.CallOption) (*CreateSelectionResponse, error)
	// Causes a value in the executor to get computed, and sends back the result.
	// WARNING: Unlike all other methods in this API, this may be a long-running
	// call (it will block until the value becomes available).
	Compute(ctx context.Context, in *ComputeRequest, opts ...grpc.CallOption) (*ComputeResponse, error)
	// Causes one or more values in the executor to get disposed of (no longer
	// available for future calls).
	Dispose(ctx context.Context, in *DisposeRequest, opts ...grpc.CallOption) (*DisposeResponse, error)
	// Causes an executor to be disposed of (no longer available for future
	// calls).
	DisposeExecutor(ctx context.Context, in *DisposeExecutorRequest, opts ...grpc.CallOption) (*DisposeExecutorResponse, error)
}

ExecutorGroupClient is the client API for ExecutorGroup 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.

type ExecutorGroupServer

type ExecutorGroupServer interface {
	// Returns a
	GetExecutor(context.Context, *GetExecutorRequest) (*GetExecutorResponse, error)
	// Creates a value in the executor and returns a reference to it that can be
	// supplied as an argument to other methods.
	CreateValue(context.Context, *CreateValueRequest) (*CreateValueResponse, error)
	// Creates a call in the executor and returns a reference to the result.
	CreateCall(context.Context, *CreateCallRequest) (*CreateCallResponse, error)
	// Creates a struct of values in the executor and returns a reference to it.
	CreateStruct(context.Context, *CreateStructRequest) (*CreateStructResponse, error)
	// Creates a selection from an executor value and returns a reference to it.
	CreateSelection(context.Context, *CreateSelectionRequest) (*CreateSelectionResponse, error)
	// Causes a value in the executor to get computed, and sends back the result.
	// WARNING: Unlike all other methods in this API, this may be a long-running
	// call (it will block until the value becomes available).
	Compute(context.Context, *ComputeRequest) (*ComputeResponse, error)
	// Causes one or more values in the executor to get disposed of (no longer
	// available for future calls).
	Dispose(context.Context, *DisposeRequest) (*DisposeResponse, error)
	// Causes an executor to be disposed of (no longer available for future
	// calls).
	DisposeExecutor(context.Context, *DisposeExecutorRequest) (*DisposeExecutorResponse, error)
	// contains filtered or unexported methods
}

ExecutorGroupServer is the server API for ExecutorGroup service. All implementations must embed UnimplementedExecutorGroupServer for forward compatibility

type ExecutorId

type ExecutorId struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

An identifier for a particular executor within an `ExecutorGroup`.

func (*ExecutorId) Descriptor deprecated

func (*ExecutorId) Descriptor() ([]byte, []int)

Deprecated: Use ExecutorId.ProtoReflect.Descriptor instead.

func (*ExecutorId) GetId

func (x *ExecutorId) GetId() string

func (*ExecutorId) ProtoMessage

func (*ExecutorId) ProtoMessage()

func (*ExecutorId) ProtoReflect

func (x *ExecutorId) ProtoReflect() protoreflect.Message

func (*ExecutorId) Reset

func (x *ExecutorId) Reset()

func (*ExecutorId) String

func (x *ExecutorId) String() string

type FederatedType

type FederatedType struct {

	// A specification of placement that identifies the collective of participants
	// in a distributed system on which member components of this federated value
	// are hosted.
	//
	// If the federated type appears as a part of a functional type signature,
	// this placement will generally be defined using a PlacementLabel to bind it
	// to the type of the parameter, e.g., as below:
	//
	// federated_broadcast: T, p: placement -> T@p
	//
	// In the above "T@p" is a federated type, with label "p" (represented in the
	// type as a PlacementLabel) simply serving as a reference to the parameter
	// on the left.
	//
	// On the other hand, if a federated type appears on its own, not tied to the
	// placement of any function parameter, the placement specified here will be
	// a concrete placement literal (represented by a PlacementValue).
	Placement *PlacementSpec `protobuf:"bytes,1,opt,name=placement,proto3" json:"placement,omitempty"`
	// A bit that, if set, indicates that the member components of the federated
	// value are all equal (if not set, member components may vary). This
	// distinction is only meaningful for placements that represent collectives,
	// such as clients or intermediate aggregators. For placements that represent
	// centralized components (such as a central coordinator), this property is
	// trivially satisfied (and still documented by setting this bit to True).
	AllEqual bool `protobuf:"varint,2,opt,name=all_equal,json=allEqual,proto3" json:"all_equal,omitempty"`
	// The type of the local member components of the federated value, i.e., the
	// components that are locally hosted on each individual participant (member
	// of the collective determined by the "placement" above).
	Member *Type `protobuf:"bytes,3,opt,name=member,proto3" json:"member,omitempty"`
	// contains filtered or unexported fields
}

A representation of a federated type, i.e., one in which member components of the federated value are hosted on a collective of devices in a distributed system (where in some cases, that collective may be a singleton). As noted above in the comment on "PlacementType", examples of such collectives could include client devices, intermediate aggregators, central coordinator, etc., with one or more participants. Note that a federated type is a dependent type, as the placement label or value contained herein binds it to a specific placement, either one that's defined globally, or one that's supplied as a parameter and defined in another part of a computation's type signature. Concise syntax for federated types: "T@p" or "{T}@p" when "all_equal" is True or False, respectively, where "T" is the type of members, and "p" is either a placement label or a placement value (generally clear from context).

func (*FederatedType) Descriptor deprecated

func (*FederatedType) Descriptor() ([]byte, []int)

Deprecated: Use FederatedType.ProtoReflect.Descriptor instead.

func (*FederatedType) GetAllEqual

func (x *FederatedType) GetAllEqual() bool

func (*FederatedType) GetMember

func (x *FederatedType) GetMember() *Type

func (*FederatedType) GetPlacement

func (x *FederatedType) GetPlacement() *PlacementSpec

func (*FederatedType) ProtoMessage

func (*FederatedType) ProtoMessage()

func (*FederatedType) ProtoReflect

func (x *FederatedType) ProtoReflect() protoreflect.Message

func (*FederatedType) Reset

func (x *FederatedType) Reset()

func (*FederatedType) String

func (x *FederatedType) String() string

type FunctionType

type FunctionType struct {
	Parameter *Type `protobuf:"bytes,1,opt,name=parameter,proto3" json:"parameter,omitempty"`
	Result    *Type `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

A representation of a functional type. Functions must have at most a single parameter and a single result. Multiple parameters or results to be modeled as compound types (e.g., as Structs). Note that since functions accept generic types, one can declare functions as parameters or results of other functions. We may not support functions as first-class values directly in the API surface, but the ability to express this is useful in defining type signatures for federated communication operators, and to support various types of extensibility. Concise syntax for examples of functional types: "T -> T'", where T, T' are the types of parameter and result, respectively.

func (*FunctionType) Descriptor deprecated

func (*FunctionType) Descriptor() ([]byte, []int)

Deprecated: Use FunctionType.ProtoReflect.Descriptor instead.

func (*FunctionType) GetParameter

func (x *FunctionType) GetParameter() *Type

func (*FunctionType) GetResult

func (x *FunctionType) GetResult() *Type

func (*FunctionType) ProtoMessage

func (*FunctionType) ProtoMessage()

func (*FunctionType) ProtoReflect

func (x *FunctionType) ProtoReflect() protoreflect.Message

func (*FunctionType) Reset

func (x *FunctionType) Reset()

func (*FunctionType) String

func (x *FunctionType) String() string

type GetExecutorRequest

type GetExecutorRequest struct {
	Cardinalities []*Cardinality `protobuf:"bytes,1,rep,name=cardinalities,proto3" json:"cardinalities,omitempty"`
	// contains filtered or unexported fields
}

func (*GetExecutorRequest) Descriptor deprecated

func (*GetExecutorRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetExecutorRequest.ProtoReflect.Descriptor instead.

func (*GetExecutorRequest) GetCardinalities

func (x *GetExecutorRequest) GetCardinalities() []*Cardinality

func (*GetExecutorRequest) ProtoMessage

func (*GetExecutorRequest) ProtoMessage()

func (*GetExecutorRequest) ProtoReflect

func (x *GetExecutorRequest) ProtoReflect() protoreflect.Message

func (*GetExecutorRequest) Reset

func (x *GetExecutorRequest) Reset()

func (*GetExecutorRequest) String

func (x *GetExecutorRequest) String() string

type GetExecutorResponse

type GetExecutorResponse struct {
	Executor *ExecutorId `protobuf:"bytes,1,opt,name=executor,proto3" json:"executor,omitempty"`
	// contains filtered or unexported fields
}

func (*GetExecutorResponse) Descriptor deprecated

func (*GetExecutorResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetExecutorResponse.ProtoReflect.Descriptor instead.

func (*GetExecutorResponse) GetExecutor

func (x *GetExecutorResponse) GetExecutor() *ExecutorId

func (*GetExecutorResponse) ProtoMessage

func (*GetExecutorResponse) ProtoMessage()

func (*GetExecutorResponse) ProtoReflect

func (x *GetExecutorResponse) ProtoReflect() protoreflect.Message

func (*GetExecutorResponse) Reset

func (x *GetExecutorResponse) Reset()

func (*GetExecutorResponse) String

func (x *GetExecutorResponse) String() string

type Intrinsic

type Intrinsic struct {

	// The URI that uniquely identifies the intrinsic within the set of operators
	// built into the framework.
	Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
	// contains filtered or unexported fields
}

A representation of an intrinsic function. Intrinsics are functions that are known to the framework, and uniquely identified by a URI. This includes both the standard federated communication operators, such as, e.g., broadcast, federated sum, secure aggregation, and custom operators that might be added by the user to the pipeline. The compiler recognizes the intrinsics, and replaces them with a suitable implementation. Intrinsics may be both generic and specialized, low- and high-level. The exact naming scheme used to identify them, and how it can be extended to support new operators defined by external contributors, will be described elsewhere.

func (*Intrinsic) Descriptor deprecated

func (*Intrinsic) Descriptor() ([]byte, []int)

Deprecated: Use Intrinsic.ProtoReflect.Descriptor instead.

func (*Intrinsic) GetUri

func (x *Intrinsic) GetUri() string

func (*Intrinsic) ProtoMessage

func (*Intrinsic) ProtoMessage()

func (*Intrinsic) ProtoReflect

func (x *Intrinsic) ProtoReflect() protoreflect.Message

func (*Intrinsic) Reset

func (x *Intrinsic) Reset()

func (*Intrinsic) String

func (x *Intrinsic) String() string

type Lambda

type Lambda struct {

	// The name to use internally within this lambda to refer to the parameter.
	// The parameter is mandatory. The name defined here can be used internally
	// anywhere in the result computation, except if overridden in a nested
	// lambda, where it can be hidden by a parameter with a conflicting name.
	ParameterName string `protobuf:"bytes,1,opt,name=parameter_name,json=parameterName,proto3" json:"parameter_name,omitempty"`
	// A computation that represents the result of applying the lambda to the
	// parameter. The result may (almost always will) contain references to the
	// parameter defined above.
	Result *Computation `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

A representation of a parameterized computation defined as a lambda expression that consists of a single parameter name, and an expression that contains references to this parameter name (the "name" computation variant). Lambdas can be nested, e.g., the result can also be a lambda or contain a lambda. Inner lambdas are allowed to refer to the parameter defined in the outer lambdas. We assume the usual rules of name hiding: inner names obscure the outer names.

Concise syntax for lambdas: "parameter_name -> comp" where "comp" represents a parameterized computation that produces the result, or in the more general form "parameter_name : T -> comp" to indicate that parameter is of type "T". For example, a lambda that takes a 2-Struct of an unary operator and an integer as input, and returns the result of calling the unary operator on the integer, can be written as "x -> x[0](x[1])", or in the full form with type annotation as "x: <(int->int), arg=int> -> x[0](x[1])".

func (*Lambda) Descriptor deprecated

func (*Lambda) Descriptor() ([]byte, []int)

Deprecated: Use Lambda.ProtoReflect.Descriptor instead.

func (*Lambda) GetParameterName

func (x *Lambda) GetParameterName() string

func (*Lambda) GetResult

func (x *Lambda) GetResult() *Computation

func (*Lambda) ProtoMessage

func (*Lambda) ProtoMessage()

func (*Lambda) ProtoReflect

func (x *Lambda) ProtoReflect() protoreflect.Message

func (*Lambda) Reset

func (x *Lambda) Reset()

func (*Lambda) String

func (x *Lambda) String() string

type Placement

type Placement struct {

	// The globally unique URI that defines a specific global placement instance.
	// For example, an URI might represent the global collective of all mobile
	// devices running a certain app, or it might represent the specific
	// well-known address of a central coordinator. The exact naming schemes and
	// interpretation of these URIs is TBD, and will be documented later.
	Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
	// contains filtered or unexported fields
}

A representation of a specific placement defined globally by the runtime environment, and embedded as a literal of the "placement" type within a type signature or a computation definition. Unlike the abstract placement labels, the URIs in these placement values have a definite global meaning for all computations executed within the same environment. The exact set of global placement URIs and their meaning will depend on the system architecture and the capabilities of the platform. For example, in a production setting, these might include dedicated URIs to represent clients, intermediate aggregators, and coordinator placements.

func (*Placement) Descriptor deprecated

func (*Placement) Descriptor() ([]byte, []int)

Deprecated: Use Placement.ProtoReflect.Descriptor instead.

func (*Placement) GetUri

func (x *Placement) GetUri() string

func (*Placement) ProtoMessage

func (*Placement) ProtoMessage()

func (*Placement) ProtoReflect

func (x *Placement) ProtoReflect() protoreflect.Message

func (*Placement) Reset

func (x *Placement) Reset()

func (*Placement) String

func (x *Placement) String() string

type PlacementLabel

type PlacementLabel struct {

	// The label used to refer to this specific placement within a type signature.
	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	// contains filtered or unexported fields
}

A representation of an abstract placement identified by a string label. All occurrences of this abstract placement label within a type signature are interpreted as referring to the same specific placement, similarly to how this is done for abstract type labels (except that equality of placement labels indicates equality of values, not just types). The abstract placement label does not have any specific meaning otherwise, and it is not intended to be compared with anything other than another abstract placement label contained within the same type signature. A bijective renaming of all abstract placement labels contained in a type signature is a semantic no-op. The label may be modified by the compiler (e.g., due to name conflicts).

func (*PlacementLabel) Descriptor deprecated

func (*PlacementLabel) Descriptor() ([]byte, []int)

Deprecated: Use PlacementLabel.ProtoReflect.Descriptor instead.

func (*PlacementLabel) GetLabel

func (x *PlacementLabel) GetLabel() string

func (*PlacementLabel) ProtoMessage

func (*PlacementLabel) ProtoMessage()

func (*PlacementLabel) ProtoReflect

func (x *PlacementLabel) ProtoReflect() protoreflect.Message

func (*PlacementLabel) Reset

func (x *PlacementLabel) Reset()

func (*PlacementLabel) String

func (x *PlacementLabel) String() string

type PlacementSpec

type PlacementSpec struct {

	// Types that are assignable to Placement:
	//	*PlacementSpec_Label
	//	*PlacementSpec_Value
	Placement isPlacementSpec_Placement `protobuf_oneof:"placement"`
	// contains filtered or unexported fields
}

A specification of a placement in a federated type. There are two ways of specifying a placement in this context that correspond to the two fields in the oneof below. Placement labels are used to construct template types of federated communication operators that can be applied to federated values. They relate all the identically-labeled placements that appear in the type signature without prescribing what specifically those placements must be. For example, consider the type signature below:

federated_broadcast: T, p: placement -> T@p

Here, "p" is a placement label, the role of which is simply to link the left and right sides of the type signature. The represenation of this type signature will use PlacementLabel on the left side.

Concrete placement values are essentially placement literals, same as those that might appear in a computation body. They are used to bind types to specific placements with definite global meaning in a particular type of runtime environment.

func (*PlacementSpec) Descriptor deprecated

func (*PlacementSpec) Descriptor() ([]byte, []int)

Deprecated: Use PlacementSpec.ProtoReflect.Descriptor instead.

func (*PlacementSpec) GetLabel

func (x *PlacementSpec) GetLabel() *PlacementLabel

func (*PlacementSpec) GetPlacement

func (m *PlacementSpec) GetPlacement() isPlacementSpec_Placement

func (*PlacementSpec) GetValue

func (x *PlacementSpec) GetValue() *Placement

func (*PlacementSpec) ProtoMessage

func (*PlacementSpec) ProtoMessage()

func (*PlacementSpec) ProtoReflect

func (x *PlacementSpec) ProtoReflect() protoreflect.Message

func (*PlacementSpec) Reset

func (x *PlacementSpec) Reset()

func (*PlacementSpec) String

func (x *PlacementSpec) String() string

type PlacementSpec_Label

type PlacementSpec_Label struct {
	Label *PlacementLabel `protobuf:"bytes,1,opt,name=label,proto3,oneof"`
}

type PlacementSpec_Value

type PlacementSpec_Value struct {
	Value *Placement `protobuf:"bytes,2,opt,name=value,proto3,oneof"`
}

type PlacementType

type PlacementType struct {

	// An optional label that can be used to refer to the specific instance of the
	// "placement" type represented by this entry in the type signature. If this
	// field is present in the PlacementType message, generally as a parameter in
	// a functional type signature, the label is associated with the specific
	// placement value supplied in that parameter, which allows it to be used to
	// specify a federated type hosted by the collective of participants
	// represented by this placement. For example, consider this type signature:
	//
	// federated_broadcast: T, p: placement -> T@p
	//
	// The type specification of the 2nd element of the broadcast argument Struct
	// would be PlacementType(instance_label=PlacementLabel(label='p')). Here, the
	// type of the second element is still simply "placement"; as noted above,
	// there is only one such built-in type to represent all sorts of collectives.
	// The presence of the label only associates 'p' with the value of the second
	// element of the parameter Struct. On the right side, the pecification of the
	// federated result type contains Placement(label=PlacementLabel(label='p')),
	// thus binding the placement of the result to the value in the argument. When
	// comparing types, the presence of this label is ignored.
	InstanceLabel *PlacementLabel `protobuf:"bytes,1,opt,name=instance_label,json=instanceLabel,proto3" json:"instance_label,omitempty"`
	// contains filtered or unexported fields
}

A representation of the type of placements (see the discussion above by the definition of the Placement message that represents instances of this type). This message is only used in situations, where placement is passed as a first-class value (e.g., in the argument to broadcast). The specfications of federated types only refer to specific placements (see Placement above). Note that there is only a single primitive "placement" type. The embedded field "instance_label" does not qualify the type and does not affect type equality. It is only used to annotate the instance of this type as it appears in a type signature in order to form dependent types. Concise syntax for the placement type: "placement" for the type itself, and "p: placement" to annotate the specific entry in the type signature with the label "p".

func (*PlacementType) Descriptor deprecated

func (*PlacementType) Descriptor() ([]byte, []int)

Deprecated: Use PlacementType.ProtoReflect.Descriptor instead.

func (*PlacementType) GetInstanceLabel

func (x *PlacementType) GetInstanceLabel() *PlacementLabel

func (*PlacementType) ProtoMessage

func (*PlacementType) ProtoMessage()

func (*PlacementType) ProtoReflect

func (x *PlacementType) ProtoReflect() protoreflect.Message

func (*PlacementType) Reset

func (x *PlacementType) Reset()

func (*PlacementType) String

func (x *PlacementType) String() string

type Reference

type Reference struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

A reference to a computation defined as a local in a block, or to the parameter of a lambda.

func (*Reference) Descriptor deprecated

func (*Reference) Descriptor() ([]byte, []int)

Deprecated: Use Reference.ProtoReflect.Descriptor instead.

func (*Reference) GetName

func (x *Reference) GetName() string

func (*Reference) ProtoMessage

func (*Reference) ProtoMessage()

func (*Reference) ProtoReflect

func (x *Reference) ProtoReflect() protoreflect.Message

func (*Reference) Reset

func (x *Reference) Reset()

func (*Reference) String

func (x *Reference) String() string

type Selection

type Selection struct {

	// The source of selection, always required. This is a computation that
	// returns a Struct (possibly nested), from which to select an element
	// by name or by index.
	Source *Computation `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
	// A specification of what to select from the context (Struct). Indexes,
	// when applied to Structs, are 0-based, i.e., "[0]" selects the first
	// element.
	Index int32 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

A representation of a value selected from a Struct returned by another computation.

The concise representation of a selection is "x[index]" for positional selection, and "x.name" for name-based selection, where "x" represents the source from which to select. For example, in lambda "x -> x[0](x[1])", where "x[0]" and "x[1]" both represent selections of named members from the STruct "x", respectively.

func (*Selection) Descriptor deprecated

func (*Selection) Descriptor() ([]byte, []int)

Deprecated: Use Selection.ProtoReflect.Descriptor instead.

func (*Selection) GetIndex

func (x *Selection) GetIndex() int32

func (*Selection) GetSource

func (x *Selection) GetSource() *Computation

func (*Selection) ProtoMessage

func (*Selection) ProtoMessage()

func (*Selection) ProtoReflect

func (x *Selection) ProtoReflect() protoreflect.Message

func (*Selection) Reset

func (x *Selection) Reset()

func (*Selection) String

func (x *Selection) String() string

type SequenceType

type SequenceType struct {
	Element *Type `protobuf:"bytes,1,opt,name=element,proto3" json:"element,omitempty"`
	// contains filtered or unexported fields
}

A representation of a type of a sequence. A sequence is a data structure that contains multiple elements of the same type that can be accessed only in a sequential manner, i.e., through an iterator. For now, we assume that a sequence can only be consumed once, i.e., there's no concept of iterator reset, as this facilitates high-performance implementations. We may add a notion of resettability in the future by introducing additional fields here while keeping non-resettability of sequences as the default. Concise syntax for examples of sequence types: "T*", where T is the type of elements.

func (*SequenceType) Descriptor deprecated

func (*SequenceType) Descriptor() ([]byte, []int)

Deprecated: Use SequenceType.ProtoReflect.Descriptor instead.

func (*SequenceType) GetElement

func (x *SequenceType) GetElement() *Type

func (*SequenceType) ProtoMessage

func (*SequenceType) ProtoMessage()

func (*SequenceType) ProtoReflect

func (x *SequenceType) ProtoReflect() protoreflect.Message

func (*SequenceType) Reset

func (x *SequenceType) Reset()

func (*SequenceType) String

func (x *SequenceType) String() string

type Struct

type Struct struct {

	// The ordering of Struct elements is significant, and determines the type of
	// the value represented by the expression. The names are optional.
	Element []*Struct_Element `protobuf:"bytes,1,rep,name=element,proto3" json:"element,omitempty"`
	// contains filtered or unexported fields
}

A representation of a Struct constructor.

The concise representation of a Struct constructor is "<>"-enclosed and comma-separated list of value or "name=value" sections, for example "<1,2>" or "<foo=1,bar=2>".

func (*Struct) Descriptor deprecated

func (*Struct) Descriptor() ([]byte, []int)

Deprecated: Use Struct.ProtoReflect.Descriptor instead.

func (*Struct) GetElement

func (x *Struct) GetElement() []*Struct_Element

func (*Struct) ProtoMessage

func (*Struct) ProtoMessage()

func (*Struct) ProtoReflect

func (x *Struct) ProtoReflect() protoreflect.Message

func (*Struct) Reset

func (x *Struct) Reset()

func (*Struct) String

func (x *Struct) String() string

type StructType

type StructType struct {
	Element []*StructType_Element `protobuf:"bytes,1,rep,name=element,proto3" json:"element,omitempty"`
	// contains filtered or unexported fields
}

A representation of a type of a struct. A struct is a compound type based on a similar type in Python that defines a finite set of named members, the types of which are known statically, that are arranged in a prescribed order and can be referred to by their position within the Struct. Note that besides structs, this abstract type can also be used to represent dicts, OrderedDicts, and regular tuples in Python. Concise syntax for examples of struct types: "T_i" or "name_i=T_i" separated by commas and optionally enclosed in "<>" (e.g., "<bool, foo=string>"), where name_i is the optional name, and T_i is the type of i-th element.

func (*StructType) Descriptor deprecated

func (*StructType) Descriptor() ([]byte, []int)

Deprecated: Use StructType.ProtoReflect.Descriptor instead.

func (*StructType) GetElement

func (x *StructType) GetElement() []*StructType_Element

func (*StructType) ProtoMessage

func (*StructType) ProtoMessage()

func (*StructType) ProtoReflect

func (x *StructType) ProtoReflect() protoreflect.Message

func (*StructType) Reset

func (x *StructType) Reset()

func (*StructType) String

func (x *StructType) String() string

type StructType_Element

type StructType_Element struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value *Type  `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*StructType_Element) Descriptor deprecated

func (*StructType_Element) Descriptor() ([]byte, []int)

Deprecated: Use StructType_Element.ProtoReflect.Descriptor instead.

func (*StructType_Element) GetName

func (x *StructType_Element) GetName() string

func (*StructType_Element) GetValue

func (x *StructType_Element) GetValue() *Type

func (*StructType_Element) ProtoMessage

func (*StructType_Element) ProtoMessage()

func (*StructType_Element) ProtoReflect

func (x *StructType_Element) ProtoReflect() protoreflect.Message

func (*StructType_Element) Reset

func (x *StructType_Element) Reset()

func (*StructType_Element) String

func (x *StructType_Element) String() string

type Struct_Element

type Struct_Element struct {
	Name  string       `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value *Computation `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Struct_Element) Descriptor deprecated

func (*Struct_Element) Descriptor() ([]byte, []int)

Deprecated: Use Struct_Element.ProtoReflect.Descriptor instead.

func (*Struct_Element) GetName

func (x *Struct_Element) GetName() string

func (*Struct_Element) GetValue

func (x *Struct_Element) GetValue() *Computation

func (*Struct_Element) ProtoMessage

func (*Struct_Element) ProtoMessage()

func (*Struct_Element) ProtoReflect

func (x *Struct_Element) ProtoReflect() protoreflect.Message

func (*Struct_Element) Reset

func (x *Struct_Element) Reset()

func (*Struct_Element) String

func (x *Struct_Element) String() string

type TensorFlow

type TensorFlow struct {

	// A serialized representation of a TensorFlow graph to execute.
	//
	// Stores a tensorflow.GraphDef message.
	// Note: This representation may evolve, e.g., get replaced with a MetaGraph,
	// SavedModel, or a similar structure. Dependencies on the exact form of the
	// graph encoding used here should be kept to minimum, and proxied by wrapper
	// libraries for composing computations in python/core/impl/.
	//
	// TODO(b/117428091): Update this representation based on the emerging TF 2.0
	// serialization standards as needed if/when they meet the constraints of the
	// target production environments, and provided that they don't introduce
	// additional complexity.
	GraphDef *anypb.Any `protobuf:"bytes,1,opt,name=graph_def,json=graphDef,proto3" json:"graph_def,omitempty"`
	// String name of an initialization op to run on the graph before fetching
	// results. This op is intended only to be used for running tf.Variable
	// initializers.
	InitializeOp string `protobuf:"bytes,4,opt,name=initialize_op,json=initializeOp,proto3" json:"initialize_op,omitempty"`
	// String name of a tensor which may be fed a unique identifier token for the
	// current session. This allows TensorFlow custom ops to refer to
	// session-global values created by the runner of the current session.
	SessionTokenTensorName string `` /* 131-byte string literal not displayed */
	// A pair of bindings for the parameter and the result. The parameter binding
	// can be omitted if the computation does not declare a parameter. The result
	// binding is mandatory, as all TensorFlow computations must declare results.
	Parameter *TensorFlow_Binding  `protobuf:"bytes,2,opt,name=parameter,proto3" json:"parameter,omitempty"`
	Result    *TensorFlow_Binding  `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
	CacheKey  *TensorFlow_CacheKey `protobuf:"bytes,5,opt,name=cache_key,json=cacheKey,proto3" json:"cache_key,omitempty"`
	// contains filtered or unexported fields
}

A representation of a section of TensorFlow code.

The type signature associated with this type of computation must be defined only in terms of tensors, Structs, and sequences. Sequences cannot be nested.

At the moment, we only allow sequences as a parameters (note that pointwise transformations of sequences can still be expressed using a map intrinsic). This restriction may be relaxed in the future when support for handling data sets as first-class objects in TensorFlow evolves.

Note that unlike in polymorphic functions created by tf.defuns, the chosen representation requires all type signatures, including those of individual elements of a sequence, to be fully specified. In case of sequences, the structure of their elements is effectively encoded in the parts of the graph that constitute the serialized representation of tf.data.Datasets and iterators.

While we will offer support for writing polymorphic TensorFlow logic, types will be captured automatically and made concrete based on usage at the Python level of the API. Users of TFF will not need to declare them explicitly, but template specialization will happen before computation logic gets serialized.

func (*TensorFlow) Descriptor deprecated

func (*TensorFlow) Descriptor() ([]byte, []int)

Deprecated: Use TensorFlow.ProtoReflect.Descriptor instead.

func (*TensorFlow) GetCacheKey

func (x *TensorFlow) GetCacheKey() *TensorFlow_CacheKey

func (*TensorFlow) GetGraphDef

func (x *TensorFlow) GetGraphDef() *anypb.Any

func (*TensorFlow) GetInitializeOp

func (x *TensorFlow) GetInitializeOp() string

func (*TensorFlow) GetParameter

func (x *TensorFlow) GetParameter() *TensorFlow_Binding

func (*TensorFlow) GetResult

func (x *TensorFlow) GetResult() *TensorFlow_Binding

func (*TensorFlow) GetSessionTokenTensorName

func (x *TensorFlow) GetSessionTokenTensorName() string

func (*TensorFlow) ProtoMessage

func (*TensorFlow) ProtoMessage()

func (*TensorFlow) ProtoReflect

func (x *TensorFlow) ProtoReflect() protoreflect.Message

func (*TensorFlow) Reset

func (x *TensorFlow) Reset()

func (*TensorFlow) String

func (x *TensorFlow) String() string

type TensorFlow_Binding

type TensorFlow_Binding struct {

	// Types that are assignable to Binding:
	//	*TensorFlow_Binding_Struct
	//	*TensorFlow_Binding_Tensor
	//	*TensorFlow_Binding_Sequence
	Binding isTensorFlow_Binding_Binding `protobuf_oneof:"binding"`
	// contains filtered or unexported fields
}

A general representation of a binding of either a parameter or a result to a part of the embedded TensorFlow graph. Note that the structure of the binding is nested, and parallels the structure of the corresponding part of the type signature.

func (*TensorFlow_Binding) Descriptor deprecated

func (*TensorFlow_Binding) Descriptor() ([]byte, []int)

Deprecated: Use TensorFlow_Binding.ProtoReflect.Descriptor instead.

func (*TensorFlow_Binding) GetBinding

func (m *TensorFlow_Binding) GetBinding() isTensorFlow_Binding_Binding

func (*TensorFlow_Binding) GetSequence

func (*TensorFlow_Binding) GetStruct

func (*TensorFlow_Binding) GetTensor

func (*TensorFlow_Binding) ProtoMessage

func (*TensorFlow_Binding) ProtoMessage()

func (*TensorFlow_Binding) ProtoReflect

func (x *TensorFlow_Binding) ProtoReflect() protoreflect.Message

func (*TensorFlow_Binding) Reset

func (x *TensorFlow_Binding) Reset()

func (*TensorFlow_Binding) String

func (x *TensorFlow_Binding) String() string

type TensorFlow_Binding_Sequence

type TensorFlow_Binding_Sequence struct {
	// A binding associated with a sequence. Associates the sequence with a
	// part of the TensorFlow graph that will represent a data set iterator,
	// next element, or an equivalent iterator-like structure.
	Sequence *TensorFlow_SequenceBinding `protobuf:"bytes,3,opt,name=sequence,proto3,oneof"`
}

type TensorFlow_Binding_Struct

type TensorFlow_Binding_Struct struct {
	// A binding associated with a struct in the type signature. Specifies an
	// individual binding for each element of the struct.
	Struct *TensorFlow_StructBinding `protobuf:"bytes,1,opt,name=struct,proto3,oneof"`
}

type TensorFlow_Binding_Tensor

type TensorFlow_Binding_Tensor struct {
	// A binding associated with a (logical) tensor in the type signature.
	// Associates that tensor to one or more (concrete) tensors in the graph.
	Tensor *TensorFlow_TensorBinding `protobuf:"bytes,2,opt,name=tensor,proto3,oneof"`
}

type TensorFlow_CacheKey

type TensorFlow_CacheKey struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

An optional id that can be used to identify identical TensorFlow messages without having to compare the (potentially large) `graph_def` fields.

This field is not intended to be set during comptuation construction/tracing. Rather, it is designed as a final compilation pass that allows execution stacks to "cache" the graphs across invoke calls, avoiding costly graph parsing every invocation.

The id is NOT required to be unique across machines, meaning two machines producing the same graph_def may have the same ids. If these machines should not be talking to the same execution stack.

NOTE: the default value of 0 has the same meaning as having the field unset, and having no id. Any code setting this value should exclude zero.

func (*TensorFlow_CacheKey) Descriptor deprecated

func (*TensorFlow_CacheKey) Descriptor() ([]byte, []int)

Deprecated: Use TensorFlow_CacheKey.ProtoReflect.Descriptor instead.

func (*TensorFlow_CacheKey) GetId

func (x *TensorFlow_CacheKey) GetId() uint64

func (*TensorFlow_CacheKey) ProtoMessage

func (*TensorFlow_CacheKey) ProtoMessage()

func (*TensorFlow_CacheKey) ProtoReflect

func (x *TensorFlow_CacheKey) ProtoReflect() protoreflect.Message

func (*TensorFlow_CacheKey) Reset

func (x *TensorFlow_CacheKey) Reset()

func (*TensorFlow_CacheKey) String

func (x *TensorFlow_CacheKey) String() string

type TensorFlow_SequenceBinding

type TensorFlow_SequenceBinding struct {

	// Types that are assignable to Binding:
	//	*TensorFlow_SequenceBinding_VariantTensorName
	//	*TensorFlow_SequenceBinding_GraphDefTensorName
	Binding isTensorFlow_SequenceBinding_Binding `protobuf_oneof:"binding"`
	// contains filtered or unexported fields
}

A representation of a sequence declared in the type signature.

func (*TensorFlow_SequenceBinding) Descriptor deprecated

func (*TensorFlow_SequenceBinding) Descriptor() ([]byte, []int)

Deprecated: Use TensorFlow_SequenceBinding.ProtoReflect.Descriptor instead.

func (*TensorFlow_SequenceBinding) GetBinding

func (m *TensorFlow_SequenceBinding) GetBinding() isTensorFlow_SequenceBinding_Binding

func (*TensorFlow_SequenceBinding) GetGraphDefTensorName

func (x *TensorFlow_SequenceBinding) GetGraphDefTensorName() string

func (*TensorFlow_SequenceBinding) GetVariantTensorName

func (x *TensorFlow_SequenceBinding) GetVariantTensorName() string

func (*TensorFlow_SequenceBinding) ProtoMessage

func (*TensorFlow_SequenceBinding) ProtoMessage()

func (*TensorFlow_SequenceBinding) ProtoReflect

func (*TensorFlow_SequenceBinding) Reset

func (x *TensorFlow_SequenceBinding) Reset()

func (*TensorFlow_SequenceBinding) String

func (x *TensorFlow_SequenceBinding) String() string

type TensorFlow_SequenceBinding_GraphDefTensorName

type TensorFlow_SequenceBinding_GraphDefTensorName struct {
	// The name of the string tensor that represents the data set created
	// using `tf.raw_ops.DatasetFromGraph`.
	GraphDefTensorName string `protobuf:"bytes,3,opt,name=graph_def_tensor_name,json=graphDefTensorName,proto3,oneof"`
}

type TensorFlow_SequenceBinding_VariantTensorName

type TensorFlow_SequenceBinding_VariantTensorName struct {
	// The name of the variant tensor that represents the data set created
	// using `tf.data.experimental.from_variant`.
	VariantTensorName string `protobuf:"bytes,2,opt,name=variant_tensor_name,json=variantTensorName,proto3,oneof"`
}

type TensorFlow_StructBinding

type TensorFlow_StructBinding struct {

	// Bindings for elements of the Struct. The number of elements in this field
	// must be equal to the number of Struct elements declared in the type
	// signature, with the k-th binding declared here corresponding to the k-th
	// Struct element in the type signature. The element names are omitted since
	// they are redundant (correspondence is established by element order).
	Element []*TensorFlow_Binding `protobuf:"bytes,1,rep,name=element,proto3" json:"element,omitempty"`
	// contains filtered or unexported fields
}

A binding of a Struct declared in the type signature to parts of the embedded TensorFlow graph.

func (*TensorFlow_StructBinding) Descriptor deprecated

func (*TensorFlow_StructBinding) Descriptor() ([]byte, []int)

Deprecated: Use TensorFlow_StructBinding.ProtoReflect.Descriptor instead.

func (*TensorFlow_StructBinding) GetElement

func (x *TensorFlow_StructBinding) GetElement() []*TensorFlow_Binding

func (*TensorFlow_StructBinding) ProtoMessage

func (*TensorFlow_StructBinding) ProtoMessage()

func (*TensorFlow_StructBinding) ProtoReflect

func (x *TensorFlow_StructBinding) ProtoReflect() protoreflect.Message

func (*TensorFlow_StructBinding) Reset

func (x *TensorFlow_StructBinding) Reset()

func (*TensorFlow_StructBinding) String

func (x *TensorFlow_StructBinding) String() string

type TensorFlow_TensorBinding

type TensorFlow_TensorBinding struct {

	// Types that are assignable to Binding:
	//	*TensorFlow_TensorBinding_TensorName
	Binding isTensorFlow_TensorBinding_Binding `protobuf_oneof:"binding"`
	// contains filtered or unexported fields
}

A representation of a single tensor declared in the type signature in the serialized graph representation embedded here.

func (*TensorFlow_TensorBinding) Descriptor deprecated

func (*TensorFlow_TensorBinding) Descriptor() ([]byte, []int)

Deprecated: Use TensorFlow_TensorBinding.ProtoReflect.Descriptor instead.

func (*TensorFlow_TensorBinding) GetBinding

func (m *TensorFlow_TensorBinding) GetBinding() isTensorFlow_TensorBinding_Binding

func (*TensorFlow_TensorBinding) GetTensorName

func (x *TensorFlow_TensorBinding) GetTensorName() string

func (*TensorFlow_TensorBinding) ProtoMessage

func (*TensorFlow_TensorBinding) ProtoMessage()

func (*TensorFlow_TensorBinding) ProtoReflect

func (x *TensorFlow_TensorBinding) ProtoReflect() protoreflect.Message

func (*TensorFlow_TensorBinding) Reset

func (x *TensorFlow_TensorBinding) Reset()

func (*TensorFlow_TensorBinding) String

func (x *TensorFlow_TensorBinding) String() string

type TensorFlow_TensorBinding_TensorName

type TensorFlow_TensorBinding_TensorName struct {
	// The name of a dense tensor in a TensorFlow graph that corresponds to a
	// single tensor component in the type signature.
	TensorName string `protobuf:"bytes,1,opt,name=tensor_name,json=tensorName,proto3,oneof"`
}

type TensorType

type TensorType struct {
	Dtype TensorType_DataType `protobuf:"varint,1,opt,name=dtype,proto3,enum=tensorflow_federated.v0.TensorType_DataType" json:"dtype,omitempty"`
	// The sizes of each dimension of the tensor.
	//
	// Undefined dimensions are allowed and represented by -1. Defined and
	// undefined dimensions are to be considered distinct for type checking
	// purposes.
	Dims []int64 `protobuf:"varint,2,rep,packed,name=dims,proto3" json:"dims,omitempty"`
	// True iff the number of dimensions is unknown.
	//
	// If `dims` is unset:
	// - `unknown_rank` == True corresponds to tf.TensorShape(None)
	// - `unknown_rank` == False corresponds to tf.TensorShape([])
	UnknownRank bool `protobuf:"varint,3,opt,name=unknown_rank,json=unknownRank,proto3" json:"unknown_rank,omitempty"`
	// contains filtered or unexported fields
}

A representation of a type of a single tensor in TensorFlow. Aspects such as sparseness are not intended to be represented at this level. Concise syntax for examples of tensor types: "dtype[shape]" or "dtype" for scalars, e.g., "bool[10]".

func (*TensorType) Descriptor deprecated

func (*TensorType) Descriptor() ([]byte, []int)

Deprecated: Use TensorType.ProtoReflect.Descriptor instead.

func (*TensorType) GetDims

func (x *TensorType) GetDims() []int64

func (*TensorType) GetDtype

func (x *TensorType) GetDtype() TensorType_DataType

func (*TensorType) GetUnknownRank

func (x *TensorType) GetUnknownRank() bool

func (*TensorType) ProtoMessage

func (*TensorType) ProtoMessage()

func (*TensorType) ProtoReflect

func (x *TensorType) ProtoReflect() protoreflect.Message

func (*TensorType) Reset

func (x *TensorType) Reset()

func (*TensorType) String

func (x *TensorType) String() string

type TensorType_DataType

type TensorType_DataType int32

Only simple tensor types are currently supported here, i.e., this specifically excludes types such as DT_VARIANT and DT_RESOURCE.

These values must match the semantics, and be a subset of, `tensorflow.DataType`.

const (
	TensorType_DT_INVALID    TensorType_DataType = 0
	TensorType_DT_FLOAT      TensorType_DataType = 1
	TensorType_DT_DOUBLE     TensorType_DataType = 2
	TensorType_DT_INT32      TensorType_DataType = 3
	TensorType_DT_UINT8      TensorType_DataType = 4
	TensorType_DT_INT16      TensorType_DataType = 5
	TensorType_DT_INT8       TensorType_DataType = 6
	TensorType_DT_STRING     TensorType_DataType = 7
	TensorType_DT_COMPLEX64  TensorType_DataType = 8
	TensorType_DT_INT64      TensorType_DataType = 9
	TensorType_DT_BOOL       TensorType_DataType = 10
	TensorType_DT_QINT8      TensorType_DataType = 11
	TensorType_DT_QUINT8     TensorType_DataType = 12
	TensorType_DT_QINT32     TensorType_DataType = 13
	TensorType_DT_BFLOAT16   TensorType_DataType = 14
	TensorType_DT_QINT16     TensorType_DataType = 15
	TensorType_DT_QUINT16    TensorType_DataType = 16
	TensorType_DT_UINT16     TensorType_DataType = 17
	TensorType_DT_COMPLEX128 TensorType_DataType = 18
	TensorType_DT_HALF       TensorType_DataType = 19
	TensorType_DT_UINT32     TensorType_DataType = 22
	TensorType_DT_UINT64     TensorType_DataType = 23
)

func (TensorType_DataType) Descriptor

func (TensorType_DataType) Enum

func (TensorType_DataType) EnumDescriptor deprecated

func (TensorType_DataType) EnumDescriptor() ([]byte, []int)

Deprecated: Use TensorType_DataType.Descriptor instead.

func (TensorType_DataType) Number

func (TensorType_DataType) String

func (x TensorType_DataType) String() string

func (TensorType_DataType) Type

type Type

type Type struct {

	// Types that are assignable to Type:
	//	*Type_Function
	//	*Type_Struct
	//	*Type_Sequence
	//	*Type_Tensor
	//	*Type_Abstract
	//	*Type_Placement
	//	*Type_Federated
	Type isType_Type `protobuf_oneof:"type"`
	// contains filtered or unexported fields
}

A generic representation of an arbitrary type, defined as a variant over a number of primitive and compound types that can be nested. Note that not all nestings expressible with this structure may be valid, e.g., it may not make sense to declare a sequence of functions, or a federated type in which individual member values are themselves federated. However, rather than constraining the set of possible nestings at the syntactic level, which would increase boilerplate and could prove limiting in the future, we keep this variant structure simple, and we let the set of all valid type nestings be determined by the set of the currently supported operators. The current limitations on nesting are as follows:

  • FederatedType and FunctionType cannot be nested within a FederatedType or within a SequenceType. Currently, these may only be nested within a StructType.
  • A SequenceType currently cannot be nested within another SequenceType.

func (*Type) Descriptor deprecated

func (*Type) Descriptor() ([]byte, []int)

Deprecated: Use Type.ProtoReflect.Descriptor instead.

func (*Type) GetAbstract

func (x *Type) GetAbstract() *AbstractType

func (*Type) GetFederated

func (x *Type) GetFederated() *FederatedType

func (*Type) GetFunction

func (x *Type) GetFunction() *FunctionType

func (*Type) GetPlacement

func (x *Type) GetPlacement() *PlacementType

func (*Type) GetSequence

func (x *Type) GetSequence() *SequenceType

func (*Type) GetStruct

func (x *Type) GetStruct() *StructType

func (*Type) GetTensor

func (x *Type) GetTensor() *TensorType

func (*Type) GetType

func (m *Type) GetType() isType_Type

func (*Type) ProtoMessage

func (*Type) ProtoMessage()

func (*Type) ProtoReflect

func (x *Type) ProtoReflect() protoreflect.Message

func (*Type) Reset

func (x *Type) Reset()

func (*Type) String

func (x *Type) String() string

type Type_Abstract

type Type_Abstract struct {
	Abstract *AbstractType `protobuf:"bytes,5,opt,name=abstract,proto3,oneof"`
}

type Type_Federated

type Type_Federated struct {
	Federated *FederatedType `protobuf:"bytes,7,opt,name=federated,proto3,oneof"`
}

type Type_Function

type Type_Function struct {
	Function *FunctionType `protobuf:"bytes,1,opt,name=function,proto3,oneof"`
}

type Type_Placement

type Type_Placement struct {
	Placement *PlacementType `protobuf:"bytes,6,opt,name=placement,proto3,oneof"`
}

type Type_Sequence

type Type_Sequence struct {
	Sequence *SequenceType `protobuf:"bytes,3,opt,name=sequence,proto3,oneof"`
}

type Type_Struct

type Type_Struct struct {
	Struct *StructType `protobuf:"bytes,2,opt,name=struct,proto3,oneof"`
}

type Type_Tensor

type Type_Tensor struct {
	Tensor *TensorType `protobuf:"bytes,4,opt,name=tensor,proto3,oneof"`
}

type UnimplementedExecutorGroupServer

type UnimplementedExecutorGroupServer struct {
}

UnimplementedExecutorGroupServer must be embedded to have forward compatible implementations.

func (UnimplementedExecutorGroupServer) Compute

func (UnimplementedExecutorGroupServer) CreateCall

func (UnimplementedExecutorGroupServer) CreateSelection

func (UnimplementedExecutorGroupServer) CreateStruct

func (UnimplementedExecutorGroupServer) CreateValue

func (UnimplementedExecutorGroupServer) Dispose

func (UnimplementedExecutorGroupServer) DisposeExecutor

func (UnimplementedExecutorGroupServer) GetExecutor

type UnsafeExecutorGroupServer

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

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

type Value

type Value struct {

	// Types that are assignable to Value:
	//	*Value_Tensor
	//	*Value_Computation
	//	*Value_Struct_
	//	*Value_Sequence_
	//	*Value_Federated_
	Value isValue_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

A representation of a value that's to be embedded in the executor, or that is being returned as a result of a computation.

func (*Value) Descriptor deprecated

func (*Value) Descriptor() ([]byte, []int)

Deprecated: Use Value.ProtoReflect.Descriptor instead.

func (*Value) GetComputation

func (x *Value) GetComputation() *Computation

func (*Value) GetFederated

func (x *Value) GetFederated() *Value_Federated

func (*Value) GetSequence

func (x *Value) GetSequence() *Value_Sequence

func (*Value) GetStruct

func (x *Value) GetStruct() *Value_Struct

func (*Value) GetTensor

func (x *Value) GetTensor() *anypb.Any

func (*Value) GetValue

func (m *Value) GetValue() isValue_Value

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) ProtoReflect

func (x *Value) ProtoReflect() protoreflect.Message

func (*Value) Reset

func (x *Value) Reset()

func (*Value) String

func (x *Value) String() string

type ValueRef

type ValueRef struct {

	// The identifier should consist of printable ASCII characters for the sake
	// of debuggability, ideally alphanumeric. The format of the identifier may
	// depend on the type of the executor.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

A reference to a value embedded in the executor, guaranteed to be unique at a minimum among all the values that have been embedded in this executor instance (but not guaranteed to be unique globally across the network), across the agreed-upon lifetime of the service (at the very least, reboots of the backend instance while the client is running should not result in name clashes). In the context of a simulation, the service lifetime should at minimum span the lifetime of the entire simulation.

func (*ValueRef) Descriptor deprecated

func (*ValueRef) Descriptor() ([]byte, []int)

Deprecated: Use ValueRef.ProtoReflect.Descriptor instead.

func (*ValueRef) GetId

func (x *ValueRef) GetId() string

func (*ValueRef) ProtoMessage

func (*ValueRef) ProtoMessage()

func (*ValueRef) ProtoReflect

func (x *ValueRef) ProtoReflect() protoreflect.Message

func (*ValueRef) Reset

func (x *ValueRef) Reset()

func (*ValueRef) String

func (x *ValueRef) String() string

type Value_Computation

type Value_Computation struct {
	// A serialized TFF computation; this is the canonical (and currently only)
	// way to pass any functional constructs, but the computation included here
	// does not necessarily have to be of a functional type.
	Computation *Computation `protobuf:"bytes,2,opt,name=computation,proto3,oneof"`
}

type Value_Federated

type Value_Federated struct {

	// The type of the federated value.
	Type *FederatedType `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// The member constituents, one per participant in the collective defined
	// by this value's placement within the executor.
	Value []*Value `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

A representation of a federated value.

func (*Value_Federated) Descriptor deprecated

func (*Value_Federated) Descriptor() ([]byte, []int)

Deprecated: Use Value_Federated.ProtoReflect.Descriptor instead.

func (*Value_Federated) GetType

func (x *Value_Federated) GetType() *FederatedType

func (*Value_Federated) GetValue

func (x *Value_Federated) GetValue() []*Value

func (*Value_Federated) ProtoMessage

func (*Value_Federated) ProtoMessage()

func (*Value_Federated) ProtoReflect

func (x *Value_Federated) ProtoReflect() protoreflect.Message

func (*Value_Federated) Reset

func (x *Value_Federated) Reset()

func (*Value_Federated) String

func (x *Value_Federated) String() string

type Value_Federated_

type Value_Federated_ struct {
	// A value of a federated type.
	Federated *Value_Federated `protobuf:"bytes,5,opt,name=federated,proto3,oneof"`
}

type Value_Sequence

type Value_Sequence struct {

	// The serialized representation of this sequence.
	//
	// Types that are assignable to Value:
	//	*Value_Sequence_ZippedSavedModel
	//	*Value_Sequence_SerializedGraphDef
	Value isValue_Sequence_Value `protobuf_oneof:"value"`
	// The TensorFlow Federated `Type` of the elements in this
	// sequence.
	ElementType *Type `protobuf:"bytes,2,opt,name=element_type,json=elementType,proto3" json:"element_type,omitempty"`
	// contains filtered or unexported fields
}

A representation of a sequence value. This message holds its type annotation because the underlying serialization provided by TensorFlow does not preserve the ordering of keys for sequences of `StructType`.

func (*Value_Sequence) Descriptor deprecated

func (*Value_Sequence) Descriptor() ([]byte, []int)

Deprecated: Use Value_Sequence.ProtoReflect.Descriptor instead.

func (*Value_Sequence) GetElementType

func (x *Value_Sequence) GetElementType() *Type

func (*Value_Sequence) GetSerializedGraphDef

func (x *Value_Sequence) GetSerializedGraphDef() []byte

func (*Value_Sequence) GetValue

func (m *Value_Sequence) GetValue() isValue_Sequence_Value

func (*Value_Sequence) GetZippedSavedModel deprecated

func (x *Value_Sequence) GetZippedSavedModel() []byte

Deprecated: Do not use.

func (*Value_Sequence) ProtoMessage

func (*Value_Sequence) ProtoMessage()

func (*Value_Sequence) ProtoReflect

func (x *Value_Sequence) ProtoReflect() protoreflect.Message

func (*Value_Sequence) Reset

func (x *Value_Sequence) Reset()

func (*Value_Sequence) String

func (x *Value_Sequence) String() string

type Value_Sequence_

type Value_Sequence_ struct {
	// A sequence of values.
	Sequence *Value_Sequence `protobuf:"bytes,4,opt,name=sequence,proto3,oneof"`
}

type Value_Sequence_SerializedGraphDef

type Value_Sequence_SerializedGraphDef struct {
	// The result of the `DatasetToGraphV2` op called on a Dataset's variant
	// tensor.
	SerializedGraphDef []byte `protobuf:"bytes,3,opt,name=serialized_graph_def,json=serializedGraphDef,proto3,oneof"`
}

type Value_Sequence_ZippedSavedModel

type Value_Sequence_ZippedSavedModel struct {
	// The bytes of a zip file over the files produced by a
	// `tf.saved_model.save()` operation, intended to be used with a
	// corresponding `tf.saved_model.load()` op.
	//
	// Deprecated: Do not use.
	ZippedSavedModel []byte `protobuf:"bytes,1,opt,name=zipped_saved_model,json=zippedSavedModel,proto3,oneof"`
}

type Value_Struct

type Value_Struct struct {
	Element []*Value_Struct_Element `protobuf:"bytes,1,rep,name=element,proto3" json:"element,omitempty"`
	// contains filtered or unexported fields
}

A representation of a struct of values. Unlike in the computation proto, elements of this struct can contain actual computed values such as serialized tensors (rather than computations).

func (*Value_Struct) Descriptor deprecated

func (*Value_Struct) Descriptor() ([]byte, []int)

Deprecated: Use Value_Struct.ProtoReflect.Descriptor instead.

func (*Value_Struct) GetElement

func (x *Value_Struct) GetElement() []*Value_Struct_Element

func (*Value_Struct) ProtoMessage

func (*Value_Struct) ProtoMessage()

func (*Value_Struct) ProtoReflect

func (x *Value_Struct) ProtoReflect() protoreflect.Message

func (*Value_Struct) Reset

func (x *Value_Struct) Reset()

func (*Value_Struct) String

func (x *Value_Struct) String() string

type Value_Struct_

type Value_Struct_ struct {
	// A struct of values.
	Struct *Value_Struct `protobuf:"bytes,3,opt,name=struct,proto3,oneof"`
}

type Value_Struct_Element

type Value_Struct_Element struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value *Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Value_Struct_Element) Descriptor deprecated

func (*Value_Struct_Element) Descriptor() ([]byte, []int)

Deprecated: Use Value_Struct_Element.ProtoReflect.Descriptor instead.

func (*Value_Struct_Element) GetName

func (x *Value_Struct_Element) GetName() string

func (*Value_Struct_Element) GetValue

func (x *Value_Struct_Element) GetValue() *Value

func (*Value_Struct_Element) ProtoMessage

func (*Value_Struct_Element) ProtoMessage()

func (*Value_Struct_Element) ProtoReflect

func (x *Value_Struct_Element) ProtoReflect() protoreflect.Message

func (*Value_Struct_Element) Reset

func (x *Value_Struct_Element) Reset()

func (*Value_Struct_Element) String

func (x *Value_Struct_Element) String() string

type Value_Tensor

type Value_Tensor struct {
	// A serialized tensor content as an instance of `tensorflow.TensorProto`,
	// as defined in `tensorflow/core/framework/tensor.proto`.
	Tensor *anypb.Any `protobuf:"bytes,1,opt,name=tensor,proto3,oneof"`
}

type Xla

type Xla struct {

	// A serialized representation of XLA code to execute.
	//
	// Stores an `HloModuleProto` message, as defined in the TensorFlow repo in
	// the file "tensorflow/compiler/xla/service/hlo.proto" in the main branch.
	//
	// It is recommended, albeit not required that the entry computation in this
	// module accepts its parameters as a single tuple.
	//
	// NOTE: As it is experimental-only, this representation may evolve, possibly
	// in a manner that is backwards-incompatible. Make sure not to depend on the
	// current form of this representation, and not to persist it in places where
	// subsequent changes could cause breakages.
	HloModule *anypb.Any `protobuf:"bytes,1,opt,name=hlo_module,json=hloModule,proto3" json:"hlo_module,omitempty"`
	// A pair of bindings for the parameter and the result. The parameter binding
	// can be omitted if the computation does not declare a parameter. The result
	// binding is mandatory, as all XLA computations must declare results.
	Parameter *Xla_Binding `protobuf:"bytes,2,opt,name=parameter,proto3" json:"parameter,omitempty"`
	Result    *Xla_Binding `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

A representation of a section of XLA code (experimental-only).

The type signature associated with this type of computation must be defined as a function which accepts and returns tensors and potentially nested structures of tensors.

func (*Xla) Descriptor deprecated

func (*Xla) Descriptor() ([]byte, []int)

Deprecated: Use Xla.ProtoReflect.Descriptor instead.

func (*Xla) GetHloModule

func (x *Xla) GetHloModule() *anypb.Any

func (*Xla) GetParameter

func (x *Xla) GetParameter() *Xla_Binding

func (*Xla) GetResult

func (x *Xla) GetResult() *Xla_Binding

func (*Xla) ProtoMessage

func (*Xla) ProtoMessage()

func (*Xla) ProtoReflect

func (x *Xla) ProtoReflect() protoreflect.Message

func (*Xla) Reset

func (x *Xla) Reset()

func (*Xla) String

func (x *Xla) String() string

type Xla_Binding

type Xla_Binding struct {

	// Types that are assignable to Binding:
	//	*Xla_Binding_Struct
	//	*Xla_Binding_Tensor
	Binding isXla_Binding_Binding `protobuf_oneof:"binding"`
	// contains filtered or unexported fields
}

A general representation of a binding of either a parameter or a result to a part of the embedded HLO module. Note that the structure of the binding is nested, and it parallels the structure of the corresponding part of the type signature.

func (*Xla_Binding) Descriptor deprecated

func (*Xla_Binding) Descriptor() ([]byte, []int)

Deprecated: Use Xla_Binding.ProtoReflect.Descriptor instead.

func (*Xla_Binding) GetBinding

func (m *Xla_Binding) GetBinding() isXla_Binding_Binding

func (*Xla_Binding) GetStruct

func (x *Xla_Binding) GetStruct() *Xla_StructBinding

func (*Xla_Binding) GetTensor

func (x *Xla_Binding) GetTensor() *Xla_TensorBinding

func (*Xla_Binding) ProtoMessage

func (*Xla_Binding) ProtoMessage()

func (*Xla_Binding) ProtoReflect

func (x *Xla_Binding) ProtoReflect() protoreflect.Message

func (*Xla_Binding) Reset

func (x *Xla_Binding) Reset()

func (*Xla_Binding) String

func (x *Xla_Binding) String() string

type Xla_Binding_Struct

type Xla_Binding_Struct struct {
	Struct *Xla_StructBinding `protobuf:"bytes,1,opt,name=struct,proto3,oneof"`
}

type Xla_Binding_Tensor

type Xla_Binding_Tensor struct {
	Tensor *Xla_TensorBinding `protobuf:"bytes,2,opt,name=tensor,proto3,oneof"`
}

type Xla_StructBinding

type Xla_StructBinding struct {

	// Bindings for elements of the struct. The number of elements in this field
	// must be equal to the number of struct elements declared in the type
	// signature, with the k-th binding declared here corresponding to the k-th
	// struct element in the type signature. The element names are omitted since
	// they are redundant (correspondence is established by element order).
	Element []*Xla_Binding `protobuf:"bytes,1,rep,name=element,proto3" json:"element,omitempty"`
	// contains filtered or unexported fields
}

A binding associated with a struct in the type signature. Specifies an individual binding for each element of the struct.

func (*Xla_StructBinding) Descriptor deprecated

func (*Xla_StructBinding) Descriptor() ([]byte, []int)

Deprecated: Use Xla_StructBinding.ProtoReflect.Descriptor instead.

func (*Xla_StructBinding) GetElement

func (x *Xla_StructBinding) GetElement() []*Xla_Binding

func (*Xla_StructBinding) ProtoMessage

func (*Xla_StructBinding) ProtoMessage()

func (*Xla_StructBinding) ProtoReflect

func (x *Xla_StructBinding) ProtoReflect() protoreflect.Message

func (*Xla_StructBinding) Reset

func (x *Xla_StructBinding) Reset()

func (*Xla_StructBinding) String

func (x *Xla_StructBinding) String() string

type Xla_TensorBinding

type Xla_TensorBinding struct {

	// Types that are assignable to Binding:
	//	*Xla_TensorBinding_Index
	Binding isXla_TensorBinding_Binding `protobuf_oneof:"binding"`
	// contains filtered or unexported fields
}

A binding associated with a (logical) tensor in the type signature. Associates that tensor to one or more (concrete) tensors in the inputs or outputs of a computation in the module.

func (*Xla_TensorBinding) Descriptor deprecated

func (*Xla_TensorBinding) Descriptor() ([]byte, []int)

Deprecated: Use Xla_TensorBinding.ProtoReflect.Descriptor instead.

func (*Xla_TensorBinding) GetBinding

func (m *Xla_TensorBinding) GetBinding() isXla_TensorBinding_Binding

func (*Xla_TensorBinding) GetIndex

func (x *Xla_TensorBinding) GetIndex() int32

func (*Xla_TensorBinding) ProtoMessage

func (*Xla_TensorBinding) ProtoMessage()

func (*Xla_TensorBinding) ProtoReflect

func (x *Xla_TensorBinding) ProtoReflect() protoreflect.Message

func (*Xla_TensorBinding) Reset

func (x *Xla_TensorBinding) Reset()

func (*Xla_TensorBinding) String

func (x *Xla_TensorBinding) String() string

type Xla_TensorBinding_Index

type Xla_TensorBinding_Index struct {
	// The 0-based index of this tensor in (the flattened form of) either the
	// parameter or result tuple for the entry computation of the HLO module,
	// i.e., the `HloComputationProto` with the id matching the module's
	// `entry_computation_id`.
	//
	// The order of indexes associated with the result tensors is defined by
	// the order in which tensors appear in the DFS traversal of the root
	// instruction in the computation (which can be a tensor, or a possibly
	// recursively nested tuple). For example, if the XLA computation returns
	// a nested tuple ((int32, int32), int32), the indexes of the tensors in
	// the result are ((0, 1), 2), accordingly.
	//
	// The order of indexes for parameter tensors is defined likewise. In the
	// case of multiple arguments, tensor indexes are determined by traversing
	// arguments in the order in which they appear on the parameter list (the
	// order of `parameter_number` in the `HloInstructionProto`s.
	// For example, if the computation takes 2 arguments, the first of which
	// is a 2-tuple of tensors, and the second of which is a tensor, the
	// indexes identifying the individual portions of the argument list would
	// be (0, 1), 2, i.e., 0 would refer to the first tuple element of the
	// first parameter, etc.
	Index int32 `protobuf:"varint,1,opt,name=index,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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