Documentation
¶
Index ¶
Constants ¶
const Version = "v1"
Version indicates the version of the 'Spec' struct used to hold information on 'VGPUConfigs'.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Spec ¶
type Spec struct {
Version string `json:"version" yaml:"version"`
VGPUConfigs map[string]VGPUConfigSpecSlice `json:"vgpu-configs,omitempty" yaml:"vgpu-configs,omitempty"`
}
Spec is a versioned struct used to hold information on 'VGPUConfigs'.
func (*Spec) UnmarshalJSON ¶
UnmarshalJSON unmarshals raw bytes into a versioned 'Spec'.
type VGPUConfigSpec ¶
type VGPUConfigSpec struct {
DeviceFilter interface{} `json:"device-filter,omitempty" yaml:"device-filter,flow,omitempty"`
Devices interface{} `json:"devices" yaml:"devices,flow"`
VGPUDevices types.VGPUConfig `json:"vgpu-devices" yaml:"vgpu-devices"`
}
VGPUConfigSpec defines the spec to declare the desired vGPU devices configuration for a set of GPUs.
func (*VGPUConfigSpec) MatchesAllDevices ¶
func (vs *VGPUConfigSpec) MatchesAllDevices() bool
MatchesAllDevices checks a 'VGPUConfigSpec' to see if it matches on 'all' devices.
func (*VGPUConfigSpec) MatchesDeviceFilter ¶
func (vs *VGPUConfigSpec) MatchesDeviceFilter(deviceID types.DeviceID) bool
MatchesDeviceFilter checks a 'VGPUConfigSpec' to see if its device filter matches the provided 'deviceID'.
func (*VGPUConfigSpec) MatchesDevices ¶
func (vs *VGPUConfigSpec) MatchesDevices(index int) bool
MatchesDevices checks a 'VGPUConfigSpec' to see if it matches on a device at the specified 'index'.
func (*VGPUConfigSpec) UnmarshalJSON ¶
func (s *VGPUConfigSpec) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals raw bytes into a 'VGPUConfigSpec'.
type VGPUConfigSpecSlice ¶
type VGPUConfigSpecSlice []VGPUConfigSpec
VGPUConfigSpecSlice represents a slice of 'VGPUConfigSpec'.
func (VGPUConfigSpecSlice) ToMigConfigSpecSlice ¶ added in v0.4.0
func (s VGPUConfigSpecSlice) ToMigConfigSpecSlice() (migpartedv1.MigConfigSpecSlice, error)