memory

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RuntimeMemoryCheckEnabled

func RuntimeMemoryCheckEnabled() bool

func SetRuntimeMemoryCheck

func SetRuntimeMemoryCheck(enabled bool)

Types

type MemoryEstimator

type MemoryEstimator interface {
	SetDefaultBackend(MemoryEstimatorBackend)
	GetRequiredMemoryForModel(context.Context, string, *inference.BackendConfiguration) (inference.RequiredMemory, error)
	HaveSufficientMemoryForModel(ctx context.Context, model string, config *inference.BackendConfiguration) (bool, inference.RequiredMemory, inference.RequiredMemory, error)
}

func NewEstimator

func NewEstimator(systemMemoryInfo SystemMemoryInfo) MemoryEstimator

type MemoryEstimatorBackend

type MemoryEstimatorBackend interface {
	GetRequiredMemoryForModel(context.Context, string, *inference.BackendConfiguration) (inference.RequiredMemory, error)
}

type SystemMemoryInfo

type SystemMemoryInfo interface {
	HaveSufficientMemory(inference.RequiredMemory) (bool, error)
	GetTotalMemory() inference.RequiredMemory
}

func NewSystemMemoryInfo

func NewSystemMemoryInfo(log logging.Logger, gpuInfo *gpuinfo.GPUInfo) (SystemMemoryInfo, error)

Jump to

Keyboard shortcuts

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