cdi

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Default path and name for CDI spec
	CDI_SPEC_PATH = "/var/run/cdi"

	// CDI spec file name
	CDI_SPEC = "amd.json"
)

Constants

Variables

This section is empty.

Functions

This section is empty.

Types

type GetGPU

type GetGPU func(string) (amdgpu.AMDGPU, error)

GetGPU is the type for functions that return the device information for the given GPU

type GetGPUs

type GetGPUs func() ([]amdgpu.DeviceInfo, error)

GetGPUs is the type for functions that return the lists of all the GPU devices on the system

type Interface

type Interface interface {
	// GenerateSpec generates the CDI spec for all GPUs available on the host system
	GenerateSpec() error

	// GetSpec returns the CDI Spec to the caller
	GetSpec() specs.Spec

	// WriteSpec writes the generated spec to disk
	WriteSpec() error

	// PrintSpec prints the generated CDI spec on the console
	PrintSpec() error

	// ValidateSpec validated the existing CDI spec on the disk
	ValidateSpec() (bool, error)
}

Interface for CDI package

func New

func New(sp string) (Interface, error)

Jump to

Keyboard shortcuts

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