compile_options

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_xla_pjrt_compile_options_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CompileOptionsProto

type CompileOptionsProto struct {

	// Refer CompileOptions for documentation of fields.
	ArgumentLayouts            []*xla_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 */
	TargetConfig               *device_description.GpuTargetConfigProto `protobuf:"bytes,8,opt,name=target_config,json=targetConfig,proto3" json:"target_config,omitempty"`
	// 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() []*xla_data.ShapeProto

func (*CompileOptionsProto) GetCompilePortableExecutable

func (x *CompileOptionsProto) GetCompilePortableExecutable() bool

func (*CompileOptionsProto) GetEnvOptionOverrides

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) GetTargetConfig

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

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

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

Deprecated: Use ExecutableAndOptionsProto.ProtoReflect.Descriptor instead.

func (*ExecutableAndOptionsProto) GetCompileOptions

func (x *ExecutableAndOptionsProto) GetCompileOptions() *CompileOptionsProto

func (*ExecutableAndOptionsProto) GetSerializedExecutable

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

func (*ExecutableAndOptionsProto) ProtoMessage

func (*ExecutableAndOptionsProto) ProtoMessage()

func (*ExecutableAndOptionsProto) ProtoReflect

func (*ExecutableAndOptionsProto) Reset

func (x *ExecutableAndOptionsProto) Reset()

func (*ExecutableAndOptionsProto) String

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 *xla_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 */
	// The amount of effort to spend on optimizing for minimizing program
	// execution time, as a value in [-1.0, +1.0]. The baseline is 0.0, which
	// strongly prioritizes execution time at the cost of longer compile times,
	// suitable for production workloads. A value of -0.5 would be appropriate for
	// research use cases that prefer faster compilations to iterate more quickly.
	// Positive values, on the other hand, might enable costly optimizations that
	// are off by default.
	ExecTimeOptimizationEffort float32 `` /* 146-byte string literal not displayed */
	// The amount of effort to spend on making the program fit in memory (where
	// "fit in memory" here has a backend-dependent meaning), as a value in
	// [-1.0,+1.0]. The baseline is 0.0, which expends significant effort on
	// attempting to make the program fit. A value of -1.0 would be appropriate
	// for use cases that wish to spend minimal effort here and fail as quickly as
	// possible instead. Positive values, on the other hand, might enable costly
	// algorithms to reduce memory usage that are off by default.
	MemoryFittingEffort float32 `protobuf:"fixed32,21,opt,name=memory_fitting_effort,json=memoryFittingEffort,proto3" json:"memory_fitting_effort,omitempty"`
	// 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 *xla_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 parameters. This changes
	// the input shape of the computation (which is undesirable), but it can be
	// used to allow to run partial compilation to determine what would be the
	// input 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 which parameters can
	// have the sharding substituted. If only one boolean value is passed in the
	// vector that is interpreted as the value to be applied for every parameter.
	AllowSpmdShardingPropagationToParameters []bool `` /* 198-byte string literal not displayed */
	// 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"`
	// Mesh shape in auto sharding options.
	AutoSpmdPartitioningMeshShape []int64 `` /* 163-byte string literal not displayed */
	// Mesh ids in auto sharding options.
	AutoSpmdPartitioningMeshIds []int64 `` /* 157-byte string literal not displayed */
	// Use Shardy, a new partitioner, to replace the existing
	// ShardingPropagation and SpmdPartitioner. See go/xla-sdy-pipeline for
	// details.
	UseShardyPartitioner bool `protobuf:"varint,19,opt,name=use_shardy_partitioner,json=useShardyPartitioner,proto3" json:"use_shardy_partitioner,omitempty"`
	// contains filtered or unexported fields
}

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

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) GetAllowSpmdShardingPropagationToParameters

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

func (*ExecutableBuildOptionsProto) GetAutoSpmdPartitioningMeshIds

func (x *ExecutableBuildOptionsProto) GetAutoSpmdPartitioningMeshIds() []int64

func (*ExecutableBuildOptionsProto) GetAutoSpmdPartitioningMeshShape

func (x *ExecutableBuildOptionsProto) GetAutoSpmdPartitioningMeshShape() []int64

func (*ExecutableBuildOptionsProto) GetCompEnvs

func (*ExecutableBuildOptionsProto) GetDebugOptions

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

func (*ExecutableBuildOptionsProto) GetDeduplicateHlo

func (x *ExecutableBuildOptionsProto) GetDeduplicateHlo() bool

func (*ExecutableBuildOptionsProto) GetDeviceAssignment

func (*ExecutableBuildOptionsProto) GetDeviceMemorySize

func (x *ExecutableBuildOptionsProto) GetDeviceMemorySize() int64

func (*ExecutableBuildOptionsProto) GetDeviceOrdinal

func (x *ExecutableBuildOptionsProto) GetDeviceOrdinal() int64

func (*ExecutableBuildOptionsProto) GetExecTimeOptimizationEffort added in v0.4.7

func (x *ExecutableBuildOptionsProto) GetExecTimeOptimizationEffort() float32

func (*ExecutableBuildOptionsProto) GetFdoProfile

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

func (*ExecutableBuildOptionsProto) GetMemoryFittingEffort added in v0.4.7

func (x *ExecutableBuildOptionsProto) GetMemoryFittingEffort() float32

func (*ExecutableBuildOptionsProto) GetNumPartitions

func (x *ExecutableBuildOptionsProto) GetNumPartitions() int64

func (*ExecutableBuildOptionsProto) GetNumReplicas

func (x *ExecutableBuildOptionsProto) GetNumReplicas() int64

func (*ExecutableBuildOptionsProto) GetResultLayout

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

func (*ExecutableBuildOptionsProto) GetRunBackendOnly

func (x *ExecutableBuildOptionsProto) GetRunBackendOnly() bool

func (*ExecutableBuildOptionsProto) GetUseAutoSpmdPartitioning

func (x *ExecutableBuildOptionsProto) GetUseAutoSpmdPartitioning() bool

func (*ExecutableBuildOptionsProto) GetUseShardyPartitioner

func (x *ExecutableBuildOptionsProto) GetUseShardyPartitioner() 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 OptionOverrideProto

type OptionOverrideProto struct {

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

func (*OptionOverrideProto) Descriptor deprecated

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

Deprecated: Use OptionOverrideProto.ProtoReflect.Descriptor instead.

func (*OptionOverrideProto) GetBoolField

func (x *OptionOverrideProto) GetBoolField() bool

func (*OptionOverrideProto) GetDoubleField

func (x *OptionOverrideProto) GetDoubleField() float64

func (*OptionOverrideProto) GetIntField

func (x *OptionOverrideProto) GetIntField() int64

func (*OptionOverrideProto) GetStringField

func (x *OptionOverrideProto) GetStringField() string

func (*OptionOverrideProto) GetValue

func (m *OptionOverrideProto) GetValue() isOptionOverrideProto_Value

func (*OptionOverrideProto) ProtoMessage

func (*OptionOverrideProto) ProtoMessage()

func (*OptionOverrideProto) ProtoReflect

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

func (*OptionOverrideProto) Reset

func (x *OptionOverrideProto) Reset()

func (*OptionOverrideProto) String

func (x *OptionOverrideProto) String() string

type OptionOverrideProto_BoolField

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

type OptionOverrideProto_DoubleField

type OptionOverrideProto_DoubleField struct {
	DoubleField float64 `protobuf:"fixed64,4,opt,name=double_field,json=doubleField,proto3,oneof"`
}

type OptionOverrideProto_IntField

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

type OptionOverrideProto_StringField

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

Jump to

Keyboard shortcuts

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