gpu

package
v0.0.0-...-e99c6c0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New() (bool, Client)

func (Client) LoadInfo

func (c Client) LoadInfo() (*Info, error)

func (Client) LoadInfoContext

func (c Client) LoadInfoContext(ctx context.Context) (*Info, error)

type Device

type Device struct {
	Type            string `json:"type"`
	Index           uint   `json:"index"`
	ProductName     string `json:"productName"`
	PersistenceMode string `json:"persistenceMode"`
	BusID           string `json:"busID"`
	DisplayActive   string `json:"displayActive"`
	ECC             string `json:"ecc"`
	FanSpeed        string `json:"fanSpeed"`

	Temperature      string    `json:"temperature"`
	PerformanceState string    `json:"performanceState"`
	PowerDraw        string    `json:"powerDraw"`
	MaxPowerLimit    string    `json:"maxPowerLimit"`
	MemUsed          string    `json:"memUsed"`
	MemTotal         string    `json:"memTotal"`
	GPUUtil          string    `json:"gpuUtil"`
	ComputeMode      string    `json:"computeMode"`
	MigMode          string    `json:"migMode"`
	Processes        []Process `json:"processes"`
}

type Info

type Info struct {
	CudaVersion   string `json:"cudaVersion"`
	DriverVersion string `json:"driverVersion"`
	Type          string `json:"type"`

	Devices []Device `json:"gpu"`
}

type Process

type Process struct {
	PID         string `json:"pid"`
	Type        string `json:"type"`
	ProcessName string `json:"processName"`
	UsedMemory  string `json:"usedMemory"`
}

Jump to

Keyboard shortcuts

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