Documentation ¶
Index ¶
- Constants
- func AlmostEqualFloat32(a float32, b float32, threshold float64) bool
- func DetermineMachineEndian() string
- func FriendlyPanic(err error)
- func InterfaceArrToIntArr(arr []interface{}) ([]int, error)
- func InterfaceToBool(val interface{}, defaultValue bool) bool
- func InterfaceToInt(val interface{}) (int, error)
- func WaitGroupDone(wg *sync.WaitGroup) chan struct{}
- type InferenceArgs
- type Logger
- type MemoryMapper
Constants ¶
View Source
const ( THRESHOLD_EXACT = 0 THRESHOLD_F32 = 1e-3 THRESHOLD_BF16 = 1e-2 )
Variables ¶
This section is empty.
Functions ¶
func DetermineMachineEndian ¶
func DetermineMachineEndian() string
func FriendlyPanic ¶
func FriendlyPanic(err error)
func InterfaceArrToIntArr ¶
func InterfaceToBool ¶
func InterfaceToInt ¶
func WaitGroupDone ¶
Types ¶
type InferenceArgs ¶
type InferenceArgs struct {
SequenceLength int // text context, 0 = from model
}
func NewInferenceArgs ¶
func NewInferenceArgs() InferenceArgs
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
var GLogger *Logger
func (*Logger) ConsoleFatal ¶
func (*Logger) ConsolePrintf ¶
func (*Logger) DebugPrintf ¶
type MemoryMapper ¶
func NewMemoryMapper ¶
func NewMemoryMapper(filePath string) (*MemoryMapper, error)
func (*MemoryMapper) Unmap ¶
func (mm *MemoryMapper) Unmap() error
Click to show internal directories.
Click to hide internal directories.