tf2xla

package
v2.14.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_tensorflow_compiler_tf2xla_host_compute_metadata_proto protoreflect.FileDescriptor
View Source
var File_tensorflow_compiler_tf2xla_tf2xla_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Config

type Config struct {

	// Each feed is a positional input argument for the generated computation.
	// The order of each entry matches the order of each input argument.
	Feed []*Feed `protobuf:"bytes,1,rep,name=feed,proto3" json:"feed,omitempty"`
	// Each fetch is a positional output argument for the generated computation.
	// The order of each entry matches the order of each output argument.
	Fetch []*Fetch `protobuf:"bytes,2,rep,name=fetch,proto3" json:"fetch,omitempty"`
	// Each variable is a named input and output of the generated computation.
	Variable []*Variable `protobuf:"bytes,3,rep,name=variable,proto3" json:"variable,omitempty"`
	// contains filtered or unexported fields
}

Config represents configuration information for tf2xla conversion.

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetFeed

func (x *Config) GetFeed() []*Feed

func (*Config) GetFetch

func (x *Config) GetFetch() []*Fetch

func (*Config) GetVariable

func (x *Config) GetVariable() []*Variable

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Feed

type Feed struct {
	Id    *TensorId                   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Shape *framework.TensorShapeProto `protobuf:"bytes,2,opt,name=shape,proto3" json:"shape,omitempty"`
	Name  string                      `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // Optional name for generated code.
	// Optional data type. This is not normally required, as the graph itself
	// contains this information. However, if the node being fed is an op that is
	// not linked into the binary, then the type cannot be inferred from the node;
	// in this case, the type should be set here.
	Type framework.DataType `protobuf:"varint,4,opt,name=type,proto3,enum=tensorflow.DataType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

Feed represents a single feed tensor in the graph, which corresponds to an input argument for the generated computation.

func (*Feed) Descriptor deprecated

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

Deprecated: Use Feed.ProtoReflect.Descriptor instead.

func (*Feed) GetId

func (x *Feed) GetId() *TensorId

func (*Feed) GetName

func (x *Feed) GetName() string

func (*Feed) GetShape

func (x *Feed) GetShape() *framework.TensorShapeProto

func (*Feed) GetType

func (x *Feed) GetType() framework.DataType

func (*Feed) ProtoMessage

func (*Feed) ProtoMessage()

func (*Feed) ProtoReflect

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

func (*Feed) Reset

func (x *Feed) Reset()

func (*Feed) String

func (x *Feed) String() string

type Fetch

type Fetch struct {
	Id   *TensorId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string    `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Optional name for generated code.
	// Optional shape and data type. If specified, may be used for validation.
	Shape *framework.TensorShapeProto `protobuf:"bytes,3,opt,name=shape,proto3" json:"shape,omitempty"`
	Type  framework.DataType          `protobuf:"varint,4,opt,name=type,proto3,enum=tensorflow.DataType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

Fetch represents a single fetch tensor in the graph, which corresponds to an output argument for the generated computation.

func (*Fetch) Descriptor deprecated

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

Deprecated: Use Fetch.ProtoReflect.Descriptor instead.

func (*Fetch) GetId

func (x *Fetch) GetId() *TensorId

func (*Fetch) GetName

func (x *Fetch) GetName() string

func (*Fetch) GetShape

func (x *Fetch) GetShape() *framework.TensorShapeProto

func (*Fetch) GetType

func (x *Fetch) GetType() framework.DataType

func (*Fetch) ProtoMessage

func (*Fetch) ProtoMessage()

func (*Fetch) ProtoReflect

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

func (*Fetch) Reset

func (x *Fetch) Reset()

func (*Fetch) String

func (x *Fetch) String() string

type HostComputeMetadata

type HostComputeMetadata struct {

	// Metadata about each device_to_host transfer
	DeviceToHost []*HostTransferMetadata `protobuf:"bytes,1,rep,name=device_to_host,json=deviceToHost,proto3" json:"device_to_host,omitempty"`
	// Metadata about each host_to_device transfer
	HostToDevice []*HostTransferMetadata `protobuf:"bytes,2,rep,name=host_to_device,json=hostToDevice,proto3" json:"host_to_device,omitempty"`
	// contains filtered or unexported fields
}

HostComputeMetadata describes all the sends and recvs from all host compute transfer ops in a computation.

func (*HostComputeMetadata) Descriptor deprecated

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

Deprecated: Use HostComputeMetadata.ProtoReflect.Descriptor instead.

func (*HostComputeMetadata) GetDeviceToHost

func (x *HostComputeMetadata) GetDeviceToHost() []*HostTransferMetadata

func (*HostComputeMetadata) GetHostToDevice

func (x *HostComputeMetadata) GetHostToDevice() []*HostTransferMetadata

func (*HostComputeMetadata) ProtoMessage

func (*HostComputeMetadata) ProtoMessage()

func (*HostComputeMetadata) ProtoReflect

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

func (*HostComputeMetadata) Reset

func (x *HostComputeMetadata) Reset()

func (*HostComputeMetadata) String

func (x *HostComputeMetadata) String() string

type HostTransferMetadata

type HostTransferMetadata struct {

	// The key used to identify this transfer.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// For each Tensor being transferred, its type and shape.
	Metadata []*TensorMetadata `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

HostTransferMetadata describes a transfer either from host to device or device to host. It has a key that is unique to the computation, and metadata about the list of tensors being transferred.

func (*HostTransferMetadata) Descriptor deprecated

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

Deprecated: Use HostTransferMetadata.ProtoReflect.Descriptor instead.

func (*HostTransferMetadata) GetKey

func (x *HostTransferMetadata) GetKey() string

func (*HostTransferMetadata) GetMetadata

func (x *HostTransferMetadata) GetMetadata() []*TensorMetadata

func (*HostTransferMetadata) ProtoMessage

func (*HostTransferMetadata) ProtoMessage()

func (*HostTransferMetadata) ProtoReflect

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

func (*HostTransferMetadata) Reset

func (x *HostTransferMetadata) Reset()

func (*HostTransferMetadata) String

func (x *HostTransferMetadata) String() string

type TensorId

type TensorId struct {
	NodeName    string `protobuf:"bytes,1,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
	OutputIndex int64  `protobuf:"varint,2,opt,name=output_index,json=outputIndex,proto3" json:"output_index,omitempty"`
	// contains filtered or unexported fields
}

TensorId identifies a tensor in a TensorFlow graph, by specifying the output index of a particular node in the graph. If the output of the named node feeds into other node(s), this corresponds to one or more edges. Otherwise it doesn't correspond to any existing edges at all, e.g. for output nodes.

func (*TensorId) Descriptor deprecated

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

Deprecated: Use TensorId.ProtoReflect.Descriptor instead.

func (*TensorId) GetNodeName

func (x *TensorId) GetNodeName() string

func (*TensorId) GetOutputIndex

func (x *TensorId) GetOutputIndex() int64

func (*TensorId) ProtoMessage

func (*TensorId) ProtoMessage()

func (*TensorId) ProtoReflect

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

func (*TensorId) Reset

func (x *TensorId) Reset()

func (*TensorId) String

func (x *TensorId) String() string

type TensorMetadata

type TensorMetadata struct {
	Type  framework.DataType          `protobuf:"varint,1,opt,name=type,proto3,enum=tensorflow.DataType" json:"type,omitempty"`
	Shape *framework.TensorShapeProto `protobuf:"bytes,2,opt,name=shape,proto3" json:"shape,omitempty"`
	// contains filtered or unexported fields
}

TensorMetadata indicates the type and shape of a Tensor that is part of a host compute transfer.

func (*TensorMetadata) Descriptor deprecated

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

Deprecated: Use TensorMetadata.ProtoReflect.Descriptor instead.

func (*TensorMetadata) GetShape

func (x *TensorMetadata) GetShape() *framework.TensorShapeProto

func (*TensorMetadata) GetType

func (x *TensorMetadata) GetType() framework.DataType

func (*TensorMetadata) ProtoMessage

func (*TensorMetadata) ProtoMessage()

func (*TensorMetadata) ProtoReflect

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

func (*TensorMetadata) Reset

func (x *TensorMetadata) Reset()

func (*TensorMetadata) String

func (x *TensorMetadata) String() string

type Variable

type Variable struct {
	NodeName string                      `protobuf:"bytes,1,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
	Name     string                      `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Optional name for generated code. If empty, node_name will be used.
	Shape    *framework.TensorShapeProto `protobuf:"bytes,3,opt,name=shape,proto3" json:"shape,omitempty"`
	Type     framework.DataType          `protobuf:"varint,4,opt,name=type,proto3,enum=tensorflow.DataType" json:"type,omitempty"`
	// Flag for variables that are never assigned. Assignments to a read-only
	// variable or unassigned variables that are not read-only are invalid.
	Readonly bool `protobuf:"varint,5,opt,name=readonly,proto3" json:"readonly,omitempty"`
	// contains filtered or unexported fields
}

Variable represents a resource variable with the given name, shape and type.

func (*Variable) Descriptor deprecated

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

Deprecated: Use Variable.ProtoReflect.Descriptor instead.

func (*Variable) GetName

func (x *Variable) GetName() string

func (*Variable) GetNodeName

func (x *Variable) GetNodeName() string

func (*Variable) GetReadonly

func (x *Variable) GetReadonly() bool

func (*Variable) GetShape

func (x *Variable) GetShape() *framework.TensorShapeProto

func (*Variable) GetType

func (x *Variable) GetType() framework.DataType

func (*Variable) ProtoMessage

func (*Variable) ProtoMessage()

func (*Variable) ProtoReflect

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

func (*Variable) Reset

func (x *Variable) Reset()

func (*Variable) String

func (x *Variable) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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