gpusharing

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsVirtualDeviceID

func IsVirtualDeviceID(virtualDeviceID string) bool

isVirtualDeviceID returns true if a input device ID comes from a virtual GPU device.

func ValidateRequest

func ValidateRequest(requestDevicesIDs []string, deviceCount int) error

ValidateRequest will first check if the input device IDs are virtual device IDs, and then validate the request. A valid sharing request (time-sharing)should meet the following conditions: 1. it is only valid to request one virtual devices in a single request. A valid sharing request (mps) should meet the following conditions: 1. if there is only one physical device, it is valid to request multiple virtual devices in a single request. 2. if there are multiple physical devices, it is only valid to request one virtual device in a single request. Note: in this validation, each MIG partition will be regarded as a physical device.

func VirtualToPhysicalDeviceID

func VirtualToPhysicalDeviceID(virtualDeviceID string) (string, error)

VirtualToPhysicalDeviceID takes a virtualDeviceID and converts it to a physicalDeviceID.

Types

type GPUSharingStrategy

type GPUSharingStrategy string
const (
	Undefined   GPUSharingStrategy = ""
	TimeSharing GPUSharingStrategy = "time-sharing"
	MPS         GPUSharingStrategy = "mps"
)
var SharingStrategy GPUSharingStrategy

Jump to

Keyboard shortcuts

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