Documentation ¶
Index ¶
- func CompileCompoundKernel(randState DeviceAllocation, args []backends.Value) ([]TypeArg, []KernelArgument, *AccTensor, int, int, bool)
- func ContiguousStrides(shape []int) []int
- func HashTypeArgs(typeArgs []TypeArg) string
- func IsSimpleStack(stack backends.Stack) bool
- type AccGenerator
- type AccGeneratorBase
- func (b *AccGeneratorBase) BufFree()
- func (b *AccGeneratorBase) BufMalloc(shape []int) *AccTensor
- func (b *AccGeneratorBase) GetRandStateDev() DeviceAllocation
- func (b *AccGeneratorBase) Init(self generators.Generator, rngSeed int, defaultDtype base.Dtype, ...)
- func (b *AccGeneratorBase) NewTensor(shape []int, dtype base.Dtype) backends.Tensor
- func (b *AccGeneratorBase) SetHistBuffers(histBins int, histOffset int)
- func (b *AccGeneratorBase) SplitToStacks(optree *backends.OpTreeNode) []backends.Stack
- type AccTensor
- func (t *AccTensor) AccData() DeviceAllocation
- func (t *AccTensor) Assign(value backends.Value) backends.Tensor
- func (t *AccTensor) Base() backends.Tensor
- func (t *AccTensor) Copy(x backends.Tensor) backends.Tensor
- func (t *AccTensor) Fill(value interface{}) backends.Tensor
- func (t *AccTensor) GetItem(index backends.Slice) backends.Tensor
- func (t *AccTensor) GetScalar() backends.Value
- func (t *AccTensor) Init(self backends.Value, backend AccGenerator, shape []int, dtype base.Dtype, ...)
- func (t *AccTensor) IsContiguous() bool
- func (t *AccTensor) IsTrans() bool
- func (t *AccTensor) Len() int
- func (t *AccTensor) Reshape(shape []int) backends.Tensor
- func (t *AccTensor) Rounding() int
- func (t *AccTensor) SetItem(index backends.Slice, value backends.Tensor)
- func (t *AccTensor) Share(shape []int, dtype base.Dtype, name string) backends.Tensor
- func (t *AccTensor) Size() int
- func (t *AccTensor) Strides() []int
- func (t *AccTensor) T() backends.Tensor
- func (t *AccTensor) Take(indices backends.Tensor, axis int) backends.Tensor
- func (t *AccTensor) TakeArray() *TakeArray
- type DeviceAllocation
- type FloatTypeArg
- type KernelArgument
- type OpTypeArg
- type Stage
- type SymbolTypeArg
- type TakeArray
- type TensorTypeArg
- type TreeNode
- type TypeArg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileCompoundKernel ¶
func CompileCompoundKernel(randState DeviceAllocation, args []backends.Value) ( []TypeArg, []KernelArgument, *AccTensor, int, int, bool)
func ContiguousStrides ¶
func HashTypeArgs ¶
func IsSimpleStack ¶
Types ¶
type AccGenerator ¶
type AccGenerator interface { generators.Generator Assign(out *AccTensor, value backends.Value) backends.Value MemAlloc(nbytes int) DeviceAllocation MemsetD8Async(dest DeviceAllocation, data uint8, count int) MemsetD16Async(dest DeviceAllocation, data uint16, count int) MemsetD32Async(dest DeviceAllocation, data uint32, count int) MemcpyDtodAsync(dest DeviceAllocation, src DeviceAllocation, size int) GetInt(src DeviceAllocation, size int) string GetFloat(src DeviceAllocation, size int) string }
type AccGeneratorBase ¶
type AccGeneratorBase struct { generators.GeneratorBase // contains filtered or unexported fields }
func (*AccGeneratorBase) BufFree ¶
func (b *AccGeneratorBase) BufFree()
func (*AccGeneratorBase) BufMalloc ¶
func (b *AccGeneratorBase) BufMalloc(shape []int) *AccTensor
func (*AccGeneratorBase) GetRandStateDev ¶
func (b *AccGeneratorBase) GetRandStateDev() DeviceAllocation
func (*AccGeneratorBase) Init ¶
func (b *AccGeneratorBase) Init( self generators.Generator, rngSeed int, defaultDtype base.Dtype, stochasticRound int, histBins int, histOffset int, compatMode backends.CompatMode)
func (*AccGeneratorBase) SetHistBuffers ¶
func (b *AccGeneratorBase) SetHistBuffers(histBins int, histOffset int)
func (*AccGeneratorBase) SplitToStacks ¶
func (b *AccGeneratorBase) SplitToStacks(optree *backends.OpTreeNode) []backends.Stack
type AccTensor ¶
type AccTensor struct { backends.TensorBase // contains filtered or unexported fields }
func NewAccTensor ¶
func (*AccTensor) AccData ¶
func (t *AccTensor) AccData() DeviceAllocation
func (*AccTensor) IsContiguous ¶
type DeviceAllocation ¶
type DeviceAllocation interface {
Add(offset int) DeviceAllocation
}
type FloatTypeArg ¶
type FloatTypeArg struct {
// contains filtered or unexported fields
}
func (*FloatTypeArg) Hash ¶
func (a *FloatTypeArg) Hash() string
func (*FloatTypeArg) Indx ¶
func (a *FloatTypeArg) Indx() int
func (*FloatTypeArg) Key ¶
func (a *FloatTypeArg) Key() string
func (*FloatTypeArg) String ¶
func (a *FloatTypeArg) String() string
type KernelArgument ¶
type KernelArgument interface{}
type Stage ¶
type Stage struct {
// contains filtered or unexported fields
}
func BuildLastStage ¶
func BuildStages ¶
func SplitStages ¶
type SymbolTypeArg ¶
type SymbolTypeArg struct {
// contains filtered or unexported fields
}
func (*SymbolTypeArg) Hash ¶
func (a *SymbolTypeArg) Hash() string
func (*SymbolTypeArg) Indx ¶
func (a *SymbolTypeArg) Indx() int
func (*SymbolTypeArg) Key ¶
func (a *SymbolTypeArg) Key() string
func (*SymbolTypeArg) String ¶
func (a *SymbolTypeArg) String() string
type TakeArray ¶
type TakeArray struct {
// contains filtered or unexported fields
}
func NewTakeArray ¶
type TensorTypeArg ¶
type TensorTypeArg struct {
// contains filtered or unexported fields
}
func (*TensorTypeArg) Dtype ¶
func (a *TensorTypeArg) Dtype() base.Dtype
func (*TensorTypeArg) Hash ¶
func (a *TensorTypeArg) Hash() string
func (*TensorTypeArg) Indx ¶
func (a *TensorTypeArg) Indx() int
func (*TensorTypeArg) Key ¶
func (a *TensorTypeArg) Key() string
func (*TensorTypeArg) String ¶
func (a *TensorTypeArg) String() string
func (*TensorTypeArg) TakeAxis ¶
func (a *TensorTypeArg) TakeAxis() int
func (*TensorTypeArg) UnitShape ¶
func (a *TensorTypeArg) UnitShape() bool
Click to show internal directories.
Click to hide internal directories.