Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllocatableDevice ¶
AllocatableDevice represents an individual device that can be allocated. This can either be a full GPU or MIG device, but not both.
type AllocatableDevices ¶
type AllocatableDevices []AllocatableDevice
AllocatableDevices holds the list of allocatable devices.
type GpuInfo ¶
type GpuInfo struct { Minor int Index int UUID string MemoryBytes uint64 ProductName string Brand string Architecture string CudaComputeCapability string DriverVersion string CudaDriverVersion string MigCapable bool MigEnabled bool }
GpuInfo holds all of the relevant information about a GPU.
type MigInfo ¶
type MigInfo struct { Parent *GpuInfo Profile nvdev.MigProfile GIProfileInfo nvml.GpuInstanceProfileInfo MemorySlices nvml.GpuInstancePlacement }
MigInfo holds all of the relevant information about a MIG device.
type NVDeviceLib ¶
type NVDeviceLib struct {
// contains filtered or unexported fields
}
NVDeviceLib encapsulates the set of libraries and methods required to query info about an NVIDIA device.
func New ¶
func New(nvmllib nvml.Interface) *NVDeviceLib
New creates a new instance of an NVDeviceLib given an nvml.Interface to work from.
func (NVDeviceLib) AlwaysShutdown ¶
func (l NVDeviceLib) AlwaysShutdown()
AlwaysShutdown unconditionally shuts down an NVDeviceLib logging any errors.
func (NVDeviceLib) GetPerGpuAllocatableDevices ¶
func (l NVDeviceLib) GetPerGpuAllocatableDevices(indices ...int) (PerGpuAllocatableDevices, error)
GetPerGpuAllocatableDevices gets the set of allocatable devices using NVDeviceLib. A list of GPU indices can be optionally provided to limit the set of allocatable devices to just those GPUs. If no indices are provided, the full set of allocatable devices across all GPUs are returned. NOTE: Both full GPUs and MIG devices are returned as part of this call.
func (NVDeviceLib) Init ¶
func (l NVDeviceLib) Init() error
Init initializes an NVDeviceLib for use.
type PerGpuAllocatableDevices ¶
type PerGpuAllocatableDevices map[int]AllocatableDevices
PerGpuAllocatableDevices holds the list of allocatable devices per GPU.