nvcaps

package
v1.14.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MigCap

type MigCap string

MigCap represents the path to a MIG cap file

func NewComputeInstanceCap

func NewComputeInstanceCap(gpu, gi, ci int) MigCap

NewComputeInstanceCap creates a MigCap for the specified MIG Compute instance. A GPU instance is uniquely defined by the GPU minor number, GI instance ID, and CI instance ID.

func NewGPUInstanceCap

func NewGPUInstanceCap(gpu, gi int) MigCap

NewGPUInstanceCap creates a MigCap for the specified MIG GPU instance. A GPU instance is uniquely defined by the GPU minor number and GI instance ID.

func (MigCap) ProcPath

func (m MigCap) ProcPath() string

ProcPath returns the proc path associated with the MIG capability

type MigCaps

type MigCaps map[MigCap]MigMinor

MigCaps stores a map of MIG cap file paths to MIG minors

func NewMigCaps

func NewMigCaps() (MigCaps, error)

NewMigCaps creates a MigCaps structure based on the contents of the MIG minors file.

func (MigCaps) GetCapDevicePath

func (m MigCaps) GetCapDevicePath(cap MigCap) (string, error)

GetCapDevicePath returns the path to the cap device for the specified cap. An error is returned if the cap is invalid.

type MigMinor

type MigMinor int

MigMinor represents the minor number of a MIG device

func (MigMinor) DevicePath

func (m MigMinor) DevicePath() string

DevicePath returns the path for the nvidia-caps device with the specified minor number

Jump to

Keyboard shortcuts

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