Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsVirtualDeviceID ¶
isVirtualDeviceID returns true if a input device ID comes from a virtual GPU device.
func ValidateRequest ¶
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 ¶
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