Documentation
¶
Index ¶
- Variables
- func FindDeviceRequest(deviceReqs []*pluginapi.DeviceRequest, name string) *pluginapi.DeviceRequest
- func GetGPUCount(req *pluginapi.ResourceRequest, deviceNames []string) (float64, sets.String, error)
- func GetNUMANodesCountToFitGPUReq(gpuReq float64, cpuTopology *machine.CPUTopology, ...) (int, int, error)
- func IsNUMAAffinityDevice(device string, deviceTopology *machine.DeviceTopology, ...) bool
- func ResolveResourceName(deviceNameToTypeMap map[string]string, resourceName string, fallback bool) string
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 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.
Click to show internal directories.
Click to hide internal directories.