tac

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FunctionFilter_FunctionFilterType_name = map[int32]string{
		0: "SKIP_TARGET_ANNOTATION",
		1: "INCLUDE_TARGET_ANNOTATION",
	}
	FunctionFilter_FunctionFilterType_value = map[string]int32{
		"SKIP_TARGET_ANNOTATION":    0,
		"INCLUDE_TARGET_ANNOTATION": 1,
	}
)

Enum value maps for FunctionFilter_FunctionFilterType.

View Source
var File_tensorflow_compiler_mlir_lite_experimental_tac_tac_filter_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type FunctionFilter

type FunctionFilter struct {

	// This name corresponds to the TFLite subgraph name in the flatbuffer.
	// `function_name_pattern` supports regex matching.
	FunctionNamePattern string                            `protobuf:"bytes,1,opt,name=function_name_pattern,json=functionNamePattern,proto3" json:"function_name_pattern,omitempty"`
	FilterType          FunctionFilter_FunctionFilterType `` /* 190-byte string literal not displayed */
	// contains filtered or unexported fields
}

Function filter is to include/exclude a function in the target annotation pass in the TAC tool pipeline.

func (*FunctionFilter) Descriptor deprecated

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

Deprecated: Use FunctionFilter.ProtoReflect.Descriptor instead.

func (*FunctionFilter) GetFilterType

func (*FunctionFilter) GetFunctionNamePattern

func (x *FunctionFilter) GetFunctionNamePattern() string

func (*FunctionFilter) ProtoMessage

func (*FunctionFilter) ProtoMessage()

func (*FunctionFilter) ProtoReflect

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

func (*FunctionFilter) Reset

func (x *FunctionFilter) Reset()

func (*FunctionFilter) String

func (x *FunctionFilter) String() string

type FunctionFilter_FunctionFilterType

type FunctionFilter_FunctionFilterType int32

Function filter types that are supported. If one function is matched for two rules with conflict, INCLUDE_TARGET_ANNOTATION has higher priority.

const (
	// To skip this function in the target annotation pass. This means all ops
	// in this function run on TFLite CPU.
	FunctionFilter_SKIP_TARGET_ANNOTATION FunctionFilter_FunctionFilterType = 0
	// To include this function in the target annotation pass. This has higher
	// priority than `SKIP_TARGET_ANNOTATION`.
	FunctionFilter_INCLUDE_TARGET_ANNOTATION FunctionFilter_FunctionFilterType = 1
)

func (FunctionFilter_FunctionFilterType) Descriptor

func (FunctionFilter_FunctionFilterType) Enum

func (FunctionFilter_FunctionFilterType) EnumDescriptor deprecated

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

Deprecated: Use FunctionFilter_FunctionFilterType.Descriptor instead.

func (FunctionFilter_FunctionFilterType) Number

func (FunctionFilter_FunctionFilterType) String

func (FunctionFilter_FunctionFilterType) Type

type OpFilter

type OpFilter struct {

	// This name corresponds to the mlir::Location of the tensor.
	// `op_name_pattern` supports regex matching.
	OpNamePattern string `protobuf:"bytes,1,opt,name=op_name_pattern,json=opNamePattern,proto3" json:"op_name_pattern,omitempty"`
	// contains filtered or unexported fields
}

Op filter is to filter out ops that user wants to run. Ops with this filter run on TFLite CPU.

func (*OpFilter) Descriptor deprecated

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

Deprecated: Use OpFilter.ProtoReflect.Descriptor instead.

func (*OpFilter) GetOpNamePattern

func (x *OpFilter) GetOpNamePattern() string

func (*OpFilter) ProtoMessage

func (*OpFilter) ProtoMessage()

func (*OpFilter) ProtoReflect

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

func (*OpFilter) Reset

func (x *OpFilter) Reset()

func (*OpFilter) String

func (x *OpFilter) String() string

type TacFilter

type TacFilter struct {

	// Types that are assignable to Filter:
	//
	//	*TacFilter_OpFilter
	//	*TacFilter_FunctionFilter
	Filter isTacFilter_Filter `protobuf_oneof:"filter"`
	// contains filtered or unexported fields
}

A filter can be used for an op or function.

func (*TacFilter) Descriptor deprecated

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

Deprecated: Use TacFilter.ProtoReflect.Descriptor instead.

func (*TacFilter) GetFilter

func (m *TacFilter) GetFilter() isTacFilter_Filter

func (*TacFilter) GetFunctionFilter

func (x *TacFilter) GetFunctionFilter() *FunctionFilter

func (*TacFilter) GetOpFilter

func (x *TacFilter) GetOpFilter() *OpFilter

func (*TacFilter) ProtoMessage

func (*TacFilter) ProtoMessage()

func (*TacFilter) ProtoReflect

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

func (*TacFilter) Reset

func (x *TacFilter) Reset()

func (*TacFilter) String

func (x *TacFilter) String() string

type TacFilter_FunctionFilter

type TacFilter_FunctionFilter struct {
	FunctionFilter *FunctionFilter `protobuf:"bytes,2,opt,name=function_filter,json=functionFilter,proto3,oneof"`
}

type TacFilter_OpFilter

type TacFilter_OpFilter struct {
	OpFilter *OpFilter `protobuf:"bytes,1,opt,name=op_filter,json=opFilter,proto3,oneof"`
}

type TacFilters

type TacFilters struct {

	// A list of filters/rules to specify the parts that user wants to run on
	// other hardware.
	TacFilters []*TacFilter `protobuf:"bytes,1,rep,name=tac_filters,json=tacFilters,proto3" json:"tac_filters,omitempty"`
	// contains filtered or unexported fields
}

A list of filters for TAC users to run ops/functions on ML hardwares. The intuition is that, for ops/functions that can be run on ML hardware (e.g. EdgeTPU) and TFLite CPU, TAC users give a hint that they're more performant to run on TFLite CPU. These filters give the TAC users freedom to specify the parts that they want to use other hardware to accelerate.

func (*TacFilters) Descriptor deprecated

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

Deprecated: Use TacFilters.ProtoReflect.Descriptor instead.

func (*TacFilters) GetTacFilters

func (x *TacFilters) GetTacFilters() []*TacFilter

func (*TacFilters) ProtoMessage

func (*TacFilters) ProtoMessage()

func (*TacFilters) ProtoReflect

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

func (*TacFilters) Reset

func (x *TacFilters) Reset()

func (*TacFilters) String

func (x *TacFilters) String() string

Jump to

Keyboard shortcuts

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