dlperf

package
v0.0.0-...-d437eb7 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: NCSA Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllDataTypes = []DataType{

	DataType{
		Name:  "Float32",
		CType: "float",
	},
}
View Source
var BwdBenchmarkArgsOption = bwdBenchmarkArgsOptionHandler{
	ConvBwdType: func(convBWDType ConvBwdType) BwdBenchmarkArgsOptionFunc {
		return func(o *bwdBenchmarkArgsOptions) {
			o.ConvBwdType = convBWDType
		}
	},
}
View Source
var FwdBenchmarkArgsOption = fwdBenchmarkArgsOptionHandler{
	IsTraining: func(isTraining bool) FwdBenchmarkArgsOptionFunc {
		return func(o *fwdBenchmarkArgsOptions) {
			o.IsTraining = isTraining
		}
	},
	ConvFwdType: func(convFWDType ConvFwdType) FwdBenchmarkArgsOptionFunc {
		return func(o *fwdBenchmarkArgsOptions) {
			o.ConvFwdType = convFWDType
		}
	},
}

Functions

func CreateBwdBenchmarkArgsOption

func CreateBwdBenchmarkArgsOption(os ...BwdBenchmarkArgsOptionFunc) *bwdBenchmarkArgsOptions

func CreateFwdBenchmarkArgsOption

func CreateFwdBenchmarkArgsOption(os ...FwdBenchmarkArgsOptionFunc) *fwdBenchmarkArgsOptions

func GetBatchSize

func GetBatchSize() int64

func Register

func Register(s Layer)

func RegisteredLayers

func RegisteredLayers() []string

func SetBatchSize

func SetBatchSize(size int64)

Types

type BwdBenchmarkArgsOptionFunc

type BwdBenchmarkArgsOptionFunc func(*bwdBenchmarkArgsOptions)

type ConvBwdType

type ConvBwdType int
const (
	ConvBwdTypeUndefined ConvBwdType = 0
	ConvBwdTypeData      ConvBwdType = 1
	ConvBwdTypeFilter    ConvBwdType = 2
	ConvBwdTypeBias      ConvBwdType = 3
)

func ConvBwdTypeString

func ConvBwdTypeString(s string) (ConvBwdType, error)

ConvBwdTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func ConvBwdTypeValues

func ConvBwdTypeValues() []ConvBwdType

ConvBwdTypeValues returns all values of the enum

func (ConvBwdType) IsAConvBwdType

func (i ConvBwdType) IsAConvBwdType() bool

IsAConvBwdType returns "true" if the value is listed in the enum definition. "false" otherwise

func (ConvBwdType) MarshalJSON

func (i ConvBwdType) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for ConvBwdType

func (ConvBwdType) MarshalText

func (i ConvBwdType) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for ConvBwdType

func (ConvBwdType) MarshalYAML

func (i ConvBwdType) MarshalYAML() (interface{}, error)

MarshalYAML implements a YAML Marshaler for ConvBwdType

func (*ConvBwdType) Scan

func (i *ConvBwdType) Scan(value interface{}) error

func (ConvBwdType) String

func (i ConvBwdType) String() string

func (*ConvBwdType) UnmarshalJSON

func (i *ConvBwdType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ConvBwdType

func (*ConvBwdType) UnmarshalText

func (i *ConvBwdType) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for ConvBwdType

func (*ConvBwdType) UnmarshalYAML

func (i *ConvBwdType) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements a YAML Unmarshaler for ConvBwdType

func (ConvBwdType) Value

func (i ConvBwdType) Value() (driver.Value, error)

type ConvFwdType

type ConvFwdType int
const (
	ConvFwdTypeUndefined           ConvFwdType = 0
	ConvFwdTypeConv                ConvFwdType = 1
	ConvFwdTypeBias                ConvFwdType = 2
	ConvFwdTypeConvFusedActivation ConvFwdType = 3
)

func ConvFwdTypeString

func ConvFwdTypeString(s string) (ConvFwdType, error)

ConvFwdTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func ConvFwdTypeValues

func ConvFwdTypeValues() []ConvFwdType

ConvFwdTypeValues returns all values of the enum

func (ConvFwdType) IsAConvFwdType

func (i ConvFwdType) IsAConvFwdType() bool

IsAConvFwdType returns "true" if the value is listed in the enum definition. "false" otherwise

func (ConvFwdType) MarshalJSON

func (i ConvFwdType) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for ConvFwdType

func (ConvFwdType) MarshalText

func (i ConvFwdType) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for ConvFwdType

func (ConvFwdType) MarshalYAML

func (i ConvFwdType) MarshalYAML() (interface{}, error)

MarshalYAML implements a YAML Marshaler for ConvFwdType

func (*ConvFwdType) Scan

func (i *ConvFwdType) Scan(value interface{}) error

func (ConvFwdType) String

func (i ConvFwdType) String() string

func (*ConvFwdType) UnmarshalJSON

func (i *ConvFwdType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ConvFwdType

func (*ConvFwdType) UnmarshalText

func (i *ConvFwdType) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for ConvFwdType

func (*ConvFwdType) UnmarshalYAML

func (i *ConvFwdType) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements a YAML Unmarshaler for ConvFwdType

func (ConvFwdType) Value

func (i ConvFwdType) Value() (driver.Value, error)

type DataType

type DataType struct {
	Name  string `json:"name"`
	CType string `json:"ctype"`
}

type FlopsInformation

type FlopsInformation struct {
	MultiplyAdds    int64 `json:"multiply_adds"`
	Additions       int64 `json:"additions"`
	Divisions       int64 `json:"divisions"`
	Exponentiations int64 `json:"exponentiations"`
	Comparisons     int64 `json:"comparisons"`
	General         int64 `json:"general"`
}

func (FlopsInformation) Add

func (FlopsInformation) Header

func (FlopsInformation) Header() []string

func (FlopsInformation) Row

func (this FlopsInformation) Row(humanFlops bool) []string

func (FlopsInformation) Total

func (this FlopsInformation) Total() int64

type FwdBenchmarkArgsOptionFunc

type FwdBenchmarkArgsOptionFunc func(*fwdBenchmarkArgsOptions)

type Layer

type Layer interface {
	Name() string
	ShortName() string
	Node() *onnx.NodeProto
	WeightTensors() []*onnx.TensorProto
	OperatorType() string
	InferShape(Layers)
	Inputs() Layers
	SetInputs(Layers)
	Outputs() Layers
	SetOutputs(Layers)
	InputShapes() []Shape
	SetInputShapes([]Shape)
	OutputShapes() []Shape
	Information() LayerInformation
	DataTypes() []DataType

	FwdBenchmarkName(...FwdBenchmarkArgsOptionFunc) string
	FwdBenchmarkFilter(string, string, ...FwdBenchmarkArgsOptionFunc) benchmark.Benchmark
	FwdBenchmarkArgs(...FwdBenchmarkArgsOptionFunc) interface{}
	FwdBenchmarkGeneratorArgNames() []string
	FwdBenchmarkAlgorithms(...FwdBenchmarkArgsOptionFunc) []string

	BwdBenchmarkName(...BwdBenchmarkArgsOptionFunc) string
	BwdBenchmarkFilter(string, string, ...BwdBenchmarkArgsOptionFunc) benchmark.Benchmark
	BwdBenchmarkArgs(...BwdBenchmarkArgsOptionFunc) interface{}
	BwdBenchmarkGeneratorArgNames() []string
	BwdBenchmarkAlgorithms(...BwdBenchmarkArgsOptionFunc) []string
}

func FromName

func FromName(s string) (Layer, error)

type LayerInformation

type LayerInformation interface {
	Name() string
	OperatorType() string
	InputNames() []string
	OutputNames() []string
	Weigths() []float32
	Shape() ShapeInformation
	Flops() FlopsInformation
	Memory() MemoryInformation
}

type Layers

type Layers []Layer

func (Layers) FwdUnion

func (lyrs Layers) FwdUnion(datatype, algorithm string) Layers

type MemoryInformation

type MemoryInformation struct {
	Weights    int64 `json:"weights,omitempty"`
	Activation int64 `json:"activation,omitempty"`
}

func (MemoryInformation) Add

type Shape

type Shape []int64

type ShapeInformation

type ShapeInformation struct {
	InputShapes  []Shape `json:"input_shapes,omitempty"`
	OutputShapes []Shape `json:"output_shapes,omitempty"`
}

func (ShapeInformation) Header

func (ShapeInformation) Header() []string

func (ShapeInformation) Row

func (this ShapeInformation) Row() []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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