util

package
v0.5.50 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoAvailableVirtualGPUHints = pkgerrors.New("no available virtual gpu hints")

Functions

func FindDeviceRequest added in v0.5.50

func FindDeviceRequest(deviceReqs []*pluginapi.DeviceRequest, name string) *pluginapi.DeviceRequest

FindDeviceRequest returns the *DeviceRequest from deviceReqs whose DeviceName matches name, or nil if not found.

func GetGPUCount

func GetGPUCount(req *pluginapi.ResourceRequest, deviceNames []string) (float64, sets.String, error)

GetGPUCount extracts GPU count from resource request

func GetNUMANodesCountToFitGPUReq

func GetNUMANodesCountToFitGPUReq(
	gpuReq float64, cpuTopology *machine.CPUTopology, gpuTopology *machine.DeviceTopology,
) (int, int, error)

func IsNUMAAffinityDevice

func IsNUMAAffinityDevice(
	device string, deviceTopology *machine.DeviceTopology, hintNodes machine.CPUSet,
) bool

func ResolveResourceName added in v0.5.50

func ResolveResourceName(deviceNameToTypeMap map[string]string, resourceName string, fallback bool) string

ResolveResourceName takes in a resourceName and tries to find a mapping of resource type from deviceNameToTypeMap. If no mapping is found, resourceName is returned if fallback is true. If fallback is false, an empty string is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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