deviceinfo

package
v0.0.0-...-b604763 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package deviceinfo provides the devices information for cos-gpu-installer

Index

Constants

View Source
const (
	K80 GPUType = iota
	P4
	P100
	V100
	L4
	T4
	H100
	H200
	B200
	GB200
	GB300
	A100_40GB
	A100_80GB
	RTX_PRO_6000
	NO_GPU
	Others
	NvidiaVendorID uint16 = 0x10de
)

Variables

View Source
var AllGPUTypeStrings = []string{
	"NVIDIA_TESLA_K80",
	"NVIDIA_TESLA_P4",
	"NVIDIA_TESLA_P100",
	"NVIDIA_TESLA_V100",
	"NVIDIA_L4",
	"NVIDIA_H100_80GB",
	"NVIDIA_H200",
	"NVIDIA_B200",
	"NVIDIA_TESLA_A100",
	"NVIDIA_A100_80GB",
	"NVIDIA_TESLA_T4",
	"NVIDIA_GB200",
	"NVIDIA_GB300",
	"NVIDIA_RTX_PRO_6000",
}

Functions

This section is empty.

Types

type GPU

type GPU struct {
	GPUType      GPUType
	SupportsVGPU bool
	IsVGPU       bool
}

GPU represents a GPU device: type does it support vGPU, is it actually a vGPU

func AvailableGPUList

func AvailableGPUList(milestone string) ([]GPU, error)

AvailableGPUList returns a list of GPU devices supported based on the milestone

type GPUType

type GPUType int

func GetGPUTypeInfo

func GetGPUTypeInfo(pciDevicesPath string) (GPUType, error)

GetGPUTypeInfo finds the GPU device type by reading sysfs. It detects the PCI ID on the system and looks it up in the gpuTypeToPciIDs map.

func ParseGPUType

func ParseGPUType(gpu string) (GPUType, error)

ParseGPUType converts a string to a GPUType enum.

func (GPUType) OpenSupported

func (g GPUType) OpenSupported() bool

TODO(gshuoy): b/331317222 - Add the open source supported in the proto file.

func (GPUType) String

func (g GPUType) String() string

func (GPUType) SupportedArches

func (g GPUType) SupportedArches() []string

TODO(gshuoy): b/331317222 - Add the arch support in the proto file. SupportedArches returns the list of supported architectures for the GPU type. Typically either "x86_64", "aarch64", or both (if future GPUs support both).

func (GPUType) SupportsArch

func (g GPUType) SupportsArch(arch string) bool

Jump to

Keyboard shortcuts

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