Documentation
¶
Index ¶
- func GetMigCapabilityDevicePaths() (map[string]string, error)
- type CudaDriverVersion
- type DeviceLib
- func (l DeviceLib) CreateMigDevice(gpu *GpuInfo, profile nvdev.MigProfile, placement *nvml.GpuInstancePlacement) (*MigInfo, error)
- func (l DeviceLib) DeleteMigDevice(mig *MigInfo) error
- func (l DeviceLib) GetGPUInfo(index int, device nvdev.Device) (*GpuInfo, error)
- func (l DeviceLib) GetMigInfos(gpuInfo *GpuInfo) (map[string]*MigInfo, error)
- func (l DeviceLib) Init() error
- func (l DeviceLib) SetComputeMode(uuids []string, mode string) error
- func (l DeviceLib) SetTimeSlice(uuids []string, timeSlice int) error
- func (l DeviceLib) Shutdown()
- type DriverRoot
- type DriverVersion
- type GpuInfo
- type MigDevicePlacement
- type MigInfo
- type MigProfileInfo
- type NvmlInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMigCapabilityDevicePaths ¶
GetMigCapabilityDevicePaths returns a mapping of MIG capability path to device node path
Types ¶
type CudaDriverVersion ¶
type CudaDriverVersion int
func (CudaDriverVersion) MajorAndMinor ¶
func (v CudaDriverVersion) MajorAndMinor() (major uint, minor uint)
type DeviceLib ¶
type DeviceLib struct {
NvmlInterface
// contains filtered or unexported fields
}
func NewDeviceLib ¶
func NewDeviceLib(driverRoot DriverRoot) (*DeviceLib, error)
func (DeviceLib) CreateMigDevice ¶
func (l DeviceLib) CreateMigDevice(gpu *GpuInfo, profile nvdev.MigProfile, placement *nvml.GpuInstancePlacement) (*MigInfo, error)
TODO: Reenable dynamic MIG functionality once it is supported in Kubernetes 1.32
func (DeviceLib) DeleteMigDevice ¶
func (DeviceLib) GetGPUInfo ¶
func (DeviceLib) GetMigInfos ¶
func (DeviceLib) SetComputeMode ¶
func (DeviceLib) SetTimeSlice ¶
type DriverRoot ¶
type DriverRoot string
func (DriverRoot) GetDevRoot ¶
func (r DriverRoot) GetDevRoot() string
GetDevRoot returns the dev root associated with the root. If the root is not a dev root, this defaults to "/".
func (DriverRoot) GetDriverLibraryPath ¶
func (r DriverRoot) GetDriverLibraryPath() (string, error)
GetDriverLibraryPath returns path to `libnvidia-ml.so.1` in the driver root. The folder for this file is also expected to be the location of other driver files.
type DriverVersion ¶
type DriverVersion struct {
DriverVersion string
CudaDriverVersion CudaDriverVersion
}
type GpuInfo ¶
type GpuInfo struct {
Index int
UUID string `json:"uuid"`
Minor int
MigEnabled bool
PciInfo nvml.PciInfo
Memory nvml.Memory
ProductName string
Brand string
Architecture string
CudaComputeCapability string
MigProfiles []*MigProfileInfo
}
func (GpuInfo) GetNumaNode ¶
GetNumaNode returns the NUMA node associated with the GPU device
type MigDevicePlacement ¶
type MigDevicePlacement struct {
nvml.GpuInstancePlacement
}
type MigInfo ¶
type MigInfo struct {
UUID string `json:"uuid"`
Index int
Profile string
Parent *GpuInfo
Placement *MigDevicePlacement
GiProfileInfo *nvml.GpuInstanceProfileInfo
GiInfo *nvml.GpuInstanceInfo
CiProfileInfo *nvml.ComputeInstanceProfileInfo
CiInfo *nvml.ComputeInstanceInfo
}
type MigProfileInfo ¶
type MigProfileInfo struct {
Profile nvdev.MigProfile
Placements []*MigDevicePlacement
}
type NvmlInterface ¶
Click to show internal directories.
Click to hide internal directories.