pjrt

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ExecutionModeProto_name = map[int32]string{
		0: "EXECUTION_MODE_UNSPECIFIED",
		1: "EXECUTION_MODE_DEFAULT",
		2: "EXECUTION_MODE_SYNCHRONOUS",
		3: "EXECUTION_MODE_ASYNCHRONOUS",
	}
	ExecutionModeProto_value = map[string]int32{
		"EXECUTION_MODE_UNSPECIFIED":  0,
		"EXECUTION_MODE_DEFAULT":      1,
		"EXECUTION_MODE_SYNCHRONOUS":  2,
		"EXECUTION_MODE_ASYNCHRONOUS": 3,
	}
)

Enum value maps for ExecutionModeProto.

View Source
var File_tensorflow_compiler_xla_pjrt_compile_options_proto protoreflect.FileDescriptor
View Source
var File_tensorflow_compiler_xla_pjrt_execute_options_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CompileOptionsProto

type CompileOptionsProto struct {

	// Refer CompileOptions for documentation of fields.
	ArgumentLayouts            []*data.ShapeProto              `protobuf:"bytes,1,rep,name=argument_layouts,json=argumentLayouts,proto3" json:"argument_layouts,omitempty"`
	ParameterIsTupledArguments bool                            `` /* 144-byte string literal not displayed */
	ExecutableBuildOptions     *ExecutableBuildOptionsProto    `` /* 129-byte string literal not displayed */
	CompilePortableExecutable  bool                            `` /* 139-byte string literal not displayed */
	ProfileVersion             int64                           `protobuf:"varint,5,opt,name=profile_version,json=profileVersion,proto3" json:"profile_version,omitempty"`
	SerializedMultiSliceConfig []byte                          `` /* 143-byte string literal not displayed */
	EnvOptionOverrides         map[string]*OptionOverrideProto `` /* 205-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*CompileOptionsProto) Descriptor deprecated

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

Deprecated: Use CompileOptionsProto.ProtoReflect.Descriptor instead.

func (*CompileOptionsProto) GetArgumentLayouts

func (x *CompileOptionsProto) GetArgumentLayouts() []*data.ShapeProto

func (*CompileOptionsProto) GetCompilePortableExecutable

func (x *CompileOptionsProto) GetCompilePortableExecutable() bool

func (*CompileOptionsProto) GetEnvOptionOverrides added in v2.13.0

func (x *CompileOptionsProto) GetEnvOptionOverrides() map[string]*OptionOverrideProto

func (*CompileOptionsProto) GetExecutableBuildOptions

func (x *CompileOptionsProto) GetExecutableBuildOptions() *ExecutableBuildOptionsProto

func (*CompileOptionsProto) GetParameterIsTupledArguments

func (x *CompileOptionsProto) GetParameterIsTupledArguments() bool

func (*CompileOptionsProto) GetProfileVersion

func (x *CompileOptionsProto) GetProfileVersion() int64

func (*CompileOptionsProto) GetSerializedMultiSliceConfig

func (x *CompileOptionsProto) GetSerializedMultiSliceConfig() []byte

func (*CompileOptionsProto) ProtoMessage

func (*CompileOptionsProto) ProtoMessage()

func (*CompileOptionsProto) ProtoReflect

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

func (*CompileOptionsProto) Reset

func (x *CompileOptionsProto) Reset()

func (*CompileOptionsProto) String

func (x *CompileOptionsProto) String() string

type ExecutableAndOptionsProto added in v2.13.0

type ExecutableAndOptionsProto struct {
	SerializedExecutable []byte               `protobuf:"bytes,1,opt,name=serialized_executable,json=serializedExecutable,proto3" json:"serialized_executable,omitempty"`
	CompileOptions       *CompileOptionsProto `protobuf:"bytes,2,opt,name=compile_options,json=compileOptions,proto3" json:"compile_options,omitempty"`
	// contains filtered or unexported fields
}

Helper for serializing opaque executables alongside CompileOptions.

func (*ExecutableAndOptionsProto) Descriptor deprecated added in v2.13.0

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

Deprecated: Use ExecutableAndOptionsProto.ProtoReflect.Descriptor instead.

func (*ExecutableAndOptionsProto) GetCompileOptions added in v2.13.0

func (x *ExecutableAndOptionsProto) GetCompileOptions() *CompileOptionsProto

func (*ExecutableAndOptionsProto) GetSerializedExecutable added in v2.13.0

func (x *ExecutableAndOptionsProto) GetSerializedExecutable() []byte

func (*ExecutableAndOptionsProto) ProtoMessage added in v2.13.0

func (*ExecutableAndOptionsProto) ProtoMessage()

func (*ExecutableAndOptionsProto) ProtoReflect added in v2.13.0

func (*ExecutableAndOptionsProto) Reset added in v2.13.0

func (x *ExecutableAndOptionsProto) Reset()

func (*ExecutableAndOptionsProto) String added in v2.13.0

func (x *ExecutableAndOptionsProto) String() string

type ExecutableBuildOptionsProto

type ExecutableBuildOptionsProto struct {

	// If set, this is the device to build the computation for. Valid
	// device_ordinal values are: 0 to # of devices - 1. These values are
	// identical to the device ordinal values used by StreamExecutor. The built
	// executable will be executable on any device equivalent to the specified
	// device as determined by Backend::devices_equivalent(). A value of -1
	// indicates this option has not been set.
	DeviceOrdinal int64 `protobuf:"varint,1,opt,name=device_ordinal,json=deviceOrdinal,proto3" json:"device_ordinal,omitempty"`
	// If set, this specifies the layout of the result of the computation. If not
	// set, the service will chose the layout of the result. A Shape is used to
	// store the layout to accommodate tuple result shapes. A value of nullptr
	// indicates the option has not been set.
	ResultLayout *data.ShapeProto `protobuf:"bytes,2,opt,name=result_layout,json=resultLayout,proto3" json:"result_layout,omitempty"`
	// Expose access to the XLA compilation environments, which will be passed to
	// the compilation process.
	CompEnvs *xla.CompilationEnvironmentsProto `protobuf:"bytes,13,opt,name=comp_envs,json=compEnvs,proto3" json:"comp_envs,omitempty"`
	// Expose access to the XLA debug options which will be passed to the
	// compilation process.
	DebugOptions *xla.DebugOptions `protobuf:"bytes,3,opt,name=debug_options,json=debugOptions,proto3" json:"debug_options,omitempty"`
	// The number of replicas of this computation that are to be executed.
	// Defaults to 1.
	NumReplicas int64 `protobuf:"varint,4,opt,name=num_replicas,json=numReplicas,proto3" json:"num_replicas,omitempty"`
	// The number of partitions in this computation. Defaults to 1.
	NumPartitions int64 `protobuf:"varint,5,opt,name=num_partitions,json=numPartitions,proto3" json:"num_partitions,omitempty"`
	// Indicates whether to use SPMD (true) or MPMD (false) partitioning when
	// num_partitions > 1 and XLA is requested to partition the input program.
	UseSpmdPartitioning bool `protobuf:"varint,6,opt,name=use_spmd_partitioning,json=useSpmdPartitioning,proto3" json:"use_spmd_partitioning,omitempty"`
	// Whether to automatically generate XLA shardings for SPMD partitioner.
	UseAutoSpmdPartitioning bool `` /* 135-byte string literal not displayed */
	// Whether HLOs should be deduplicated.
	DeduplicateHlo bool `protobuf:"varint,8,opt,name=deduplicate_hlo,json=deduplicateHlo,proto3" json:"deduplicate_hlo,omitempty"`
	// If set, this specifies a static device assignment for the computation.
	// Otherwise, the computation will be compiled generically and can be run with
	// any device assignment compatible with the computation's replica and
	// partition counts.
	DeviceAssignment *data.DeviceAssignmentProto `protobuf:"bytes,9,opt,name=device_assignment,json=deviceAssignment,proto3" json:"device_assignment,omitempty"`
	// Whether input and output buffers are aliased if the associated parameter is
	// passed-through XLA modules without being changed.
	AliasPassthroughParams bool `` /* 131-byte string literal not displayed */
	// By default, XLA builds an executable by invoking standard compilation, i.e.
	// running Compiler::Compile, or both Compiler::RunHloPasses and
	// Compiler::RunBackend. When run_backend_only is set to true, XLA builds an
	// executable by invoking only RunBackend and skip invoking RunHloPasses,
	// which can be used to compile post-optimizations HLO modules.
	RunBackendOnly bool `protobuf:"varint,11,opt,name=run_backend_only,json=runBackendOnly,proto3" json:"run_backend_only,omitempty"`
	// Allows sharding propagation to propagate to the outputs. This changes the
	// output shape of the computation (which is undesirable), but it can be used
	// to allow to run partial compilation to determine what would be the output
	// sharding of a computation if XLA would be allowed to propagate the sharding
	// which can be used by higher level framework as a way to query intermediate
	// sharding of operations when multiple computation would be chained and
	// merged together.
	// This is a vector of bool, because the user can control (if the output of
	// the computation is a tuple) which elements of the tuple can have the
	// sharding substituted and which don't. If only one boolean value is passed
	// in the vector that's interpreted as the value to be applied for every
	// single element of the output tuple. One value per element of the tuple
	// means that each value is attached to one of the output elements.
	AllowSpmdShardingPropagationToOutput []bool `` /* 186-byte string literal not displayed */
	// Opaque profile data for any feedback directed optimizations.
	FdoProfile       []byte `protobuf:"bytes,14,opt,name=fdo_profile,json=fdoProfile,proto3" json:"fdo_profile,omitempty"`
	DeviceMemorySize int64  `protobuf:"varint,15,opt,name=device_memory_size,json=deviceMemorySize,proto3" json:"device_memory_size,omitempty"`
	// contains filtered or unexported fields
}

A serialization of xla::ExecutableBuildOptions. Next id: 16.

func (*ExecutableBuildOptionsProto) Descriptor deprecated

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

Deprecated: Use ExecutableBuildOptionsProto.ProtoReflect.Descriptor instead.

func (*ExecutableBuildOptionsProto) GetAliasPassthroughParams

func (x *ExecutableBuildOptionsProto) GetAliasPassthroughParams() bool

func (*ExecutableBuildOptionsProto) GetAllowSpmdShardingPropagationToOutput

func (x *ExecutableBuildOptionsProto) GetAllowSpmdShardingPropagationToOutput() []bool

func (*ExecutableBuildOptionsProto) GetCompEnvs added in v2.12.0

func (*ExecutableBuildOptionsProto) GetDebugOptions

func (x *ExecutableBuildOptionsProto) GetDebugOptions() *xla.DebugOptions

func (*ExecutableBuildOptionsProto) GetDeduplicateHlo

func (x *ExecutableBuildOptionsProto) GetDeduplicateHlo() bool

func (*ExecutableBuildOptionsProto) GetDeviceAssignment

func (x *ExecutableBuildOptionsProto) GetDeviceAssignment() *data.DeviceAssignmentProto

func (*ExecutableBuildOptionsProto) GetDeviceMemorySize added in v2.14.0

func (x *ExecutableBuildOptionsProto) GetDeviceMemorySize() int64

func (*ExecutableBuildOptionsProto) GetDeviceOrdinal

func (x *ExecutableBuildOptionsProto) GetDeviceOrdinal() int64

func (*ExecutableBuildOptionsProto) GetFdoProfile added in v2.14.0

func (x *ExecutableBuildOptionsProto) GetFdoProfile() []byte

func (*ExecutableBuildOptionsProto) GetNumPartitions

func (x *ExecutableBuildOptionsProto) GetNumPartitions() int64

func (*ExecutableBuildOptionsProto) GetNumReplicas

func (x *ExecutableBuildOptionsProto) GetNumReplicas() int64

func (*ExecutableBuildOptionsProto) GetResultLayout

func (x *ExecutableBuildOptionsProto) GetResultLayout() *data.ShapeProto

func (*ExecutableBuildOptionsProto) GetRunBackendOnly

func (x *ExecutableBuildOptionsProto) GetRunBackendOnly() bool

func (*ExecutableBuildOptionsProto) GetUseAutoSpmdPartitioning

func (x *ExecutableBuildOptionsProto) GetUseAutoSpmdPartitioning() bool

func (*ExecutableBuildOptionsProto) GetUseSpmdPartitioning

func (x *ExecutableBuildOptionsProto) GetUseSpmdPartitioning() bool

func (*ExecutableBuildOptionsProto) ProtoMessage

func (*ExecutableBuildOptionsProto) ProtoMessage()

func (*ExecutableBuildOptionsProto) ProtoReflect

func (*ExecutableBuildOptionsProto) Reset

func (x *ExecutableBuildOptionsProto) Reset()

func (*ExecutableBuildOptionsProto) String

func (x *ExecutableBuildOptionsProto) String() string

type ExecuteOptionsProto added in v2.14.0

type ExecuteOptionsProto struct {
	ArgumentsAreTupled       bool               `protobuf:"varint,1,opt,name=arguments_are_tupled,json=argumentsAreTupled,proto3" json:"arguments_are_tupled,omitempty"`
	UntupleResult            bool               `protobuf:"varint,2,opt,name=untuple_result,json=untupleResult,proto3" json:"untuple_result,omitempty"`
	LaunchId                 int32              `protobuf:"varint,3,opt,name=launch_id,json=launchId,proto3" json:"launch_id,omitempty"`
	StrictShapeChecking      bool               `protobuf:"varint,4,opt,name=strict_shape_checking,json=strictShapeChecking,proto3" json:"strict_shape_checking,omitempty"`
	ExecutionMode            ExecutionModeProto `` /* 129-byte string literal not displayed */
	NonDonatableInputIndices []int32            `` /* 145-byte string literal not displayed */
	// contains filtered or unexported fields
}

Mirrors `xla::ExecuteOptions`.

func (*ExecuteOptionsProto) Descriptor deprecated added in v2.14.0

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

Deprecated: Use ExecuteOptionsProto.ProtoReflect.Descriptor instead.

func (*ExecuteOptionsProto) GetArgumentsAreTupled added in v2.14.0

func (x *ExecuteOptionsProto) GetArgumentsAreTupled() bool

func (*ExecuteOptionsProto) GetExecutionMode added in v2.14.0

func (x *ExecuteOptionsProto) GetExecutionMode() ExecutionModeProto

func (*ExecuteOptionsProto) GetLaunchId added in v2.14.0

func (x *ExecuteOptionsProto) GetLaunchId() int32

func (*ExecuteOptionsProto) GetNonDonatableInputIndices added in v2.14.0

func (x *ExecuteOptionsProto) GetNonDonatableInputIndices() []int32

func (*ExecuteOptionsProto) GetStrictShapeChecking added in v2.14.0

func (x *ExecuteOptionsProto) GetStrictShapeChecking() bool

func (*ExecuteOptionsProto) GetUntupleResult added in v2.14.0

func (x *ExecuteOptionsProto) GetUntupleResult() bool

func (*ExecuteOptionsProto) ProtoMessage added in v2.14.0

func (*ExecuteOptionsProto) ProtoMessage()

func (*ExecuteOptionsProto) ProtoReflect added in v2.14.0

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

func (*ExecuteOptionsProto) Reset added in v2.14.0

func (x *ExecuteOptionsProto) Reset()

func (*ExecuteOptionsProto) String added in v2.14.0

func (x *ExecuteOptionsProto) String() string

type ExecutionModeProto added in v2.14.0

type ExecutionModeProto int32
const (
	ExecutionModeProto_EXECUTION_MODE_UNSPECIFIED  ExecutionModeProto = 0
	ExecutionModeProto_EXECUTION_MODE_DEFAULT      ExecutionModeProto = 1
	ExecutionModeProto_EXECUTION_MODE_SYNCHRONOUS  ExecutionModeProto = 2
	ExecutionModeProto_EXECUTION_MODE_ASYNCHRONOUS ExecutionModeProto = 3
)

func (ExecutionModeProto) Descriptor added in v2.14.0

func (ExecutionModeProto) Enum added in v2.14.0

func (ExecutionModeProto) EnumDescriptor deprecated added in v2.14.0

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

Deprecated: Use ExecutionModeProto.Descriptor instead.

func (ExecutionModeProto) Number added in v2.14.0

func (ExecutionModeProto) String added in v2.14.0

func (x ExecutionModeProto) String() string

func (ExecutionModeProto) Type added in v2.14.0

type OptionOverrideProto added in v2.13.0

type OptionOverrideProto struct {

	// Types that are assignable to Value:
	//
	//	*OptionOverrideProto_StringField
	//	*OptionOverrideProto_BoolField
	//	*OptionOverrideProto_IntField
	Value isOptionOverrideProto_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

func (*OptionOverrideProto) Descriptor deprecated added in v2.13.0

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

Deprecated: Use OptionOverrideProto.ProtoReflect.Descriptor instead.

func (*OptionOverrideProto) GetBoolField added in v2.13.0

func (x *OptionOverrideProto) GetBoolField() bool

func (*OptionOverrideProto) GetIntField added in v2.14.0

func (x *OptionOverrideProto) GetIntField() int64

func (*OptionOverrideProto) GetStringField added in v2.13.0

func (x *OptionOverrideProto) GetStringField() string

func (*OptionOverrideProto) GetValue added in v2.13.0

func (m *OptionOverrideProto) GetValue() isOptionOverrideProto_Value

func (*OptionOverrideProto) ProtoMessage added in v2.13.0

func (*OptionOverrideProto) ProtoMessage()

func (*OptionOverrideProto) ProtoReflect added in v2.13.0

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

func (*OptionOverrideProto) Reset added in v2.13.0

func (x *OptionOverrideProto) Reset()

func (*OptionOverrideProto) String added in v2.13.0

func (x *OptionOverrideProto) String() string

type OptionOverrideProto_BoolField added in v2.13.0

type OptionOverrideProto_BoolField struct {
	BoolField bool `protobuf:"varint,2,opt,name=bool_field,json=boolField,proto3,oneof"`
}

type OptionOverrideProto_IntField added in v2.14.0

type OptionOverrideProto_IntField struct {
	IntField int64 `protobuf:"varint,3,opt,name=int_field,json=intField,proto3,oneof"`
}

type OptionOverrideProto_StringField added in v2.13.0

type OptionOverrideProto_StringField struct {
	StringField string `protobuf:"bytes,1,opt,name=string_field,json=stringField,proto3,oneof"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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