xpu

package
v1.10.29-lts Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: GPL-3.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 Basic

type Basic struct {
	DeviceID      int    `json:"deviceID"`
	DeviceName    string `json:"deviceName"`
	VendorName    string `json:"vendorName"`
	DriverVersion string `json:"driverVersion"`
	Memory        string `json:"memory"`
	FreeMemory    string `json:"freeMemory"`
	PciBdfAddress string `json:"pciBdfAddress"`
}

type Device

type Device struct {
	DeviceFunctionType string `json:"device_function_type"`
	DeviceID           int    `json:"device_id"`
	DeviceName         string `json:"device_name"`
	DeviceType         string `json:"device_type"`
	DrmDevice          string `json:"drm_device"`
	PciBdfAddress      string `json:"pci_bdf_address"`
	PciDeviceID        string `json:"pci_device_id"`
	UUID               string `json:"uuid"`
	VendorName         string `json:"vendor_name"`

	MemoryPhysicalSizeByte string `json:"memory_physical_size_byte"`
	MemoryFreeSizeByte     string `json:"memory_free_size_byte"`
	DriverVersion          string `json:"driver_version"`
}

type DeviceInfo

type DeviceInfo struct {
	DeviceList []Device `json:"device_list"`
}

type DeviceLevelMetric

type DeviceLevelMetric struct {
	MetricsType string  `json:"metrics_type"`
	Value       float64 `json:"value"`
}

type DeviceStats

type DeviceStats struct {
	DeviceID    int                 `json:"device_id"`
	DeviceLevel []DeviceLevelMetric `json:"device_level"`
}

type DeviceUtilByProc

type DeviceUtilByProc struct {
	DeviceID      int     `json:"device_id"`
	MemSize       float64 `json:"mem_size"`
	ProcessID     int     `json:"process_id"`
	ProcessName   string  `json:"process_name"`
	SharedMemSize float64 `json:"shared_mem_size"`
}

type DeviceUtilByProcList

type DeviceUtilByProcList struct {
	DeviceUtilByProcList []DeviceUtilByProc `json:"device_util_by_proc_list"`
}

type Process

type Process struct {
	PID     int    `json:"pid"`
	Command string `json:"command"`
	SHR     string `json:"shr"`
	Memory  string `json:"memory"`
}

type Stats

type Stats struct {
	Power       string `json:"power"`
	Frequency   string `json:"frequency"`
	Temperature string `json:"temperature"`
	MemoryUsed  string `json:"memoryUsed"`
	MemoryUtil  string `json:"memoryUtil"`
}

type XPUSimpleInfo

type XPUSimpleInfo struct {
	DeviceID    int    `json:"deviceID"`
	DeviceName  string `json:"deviceName"`
	Memory      string `json:"memory"`
	Temperature string `json:"temperature"`
	MemoryUsed  string `json:"memoryUsed"`
	Power       string `json:"power"`
	MemoryUtil  string `json:"memoryUtil"`
}

type Xpu

type Xpu struct {
	Basic     Basic     `json:"basic"`
	Stats     Stats     `json:"stats"`
	Processes []Process `json:"processes"`
}

type XpuInfo

type XpuInfo struct {
	Type          string `json:"type"`
	DriverVersion string `json:"driverVersion"`

	Xpu []Xpu `json:"xpu"`
}

type XpuSMI

type XpuSMI struct{}

func New

func New() (bool, XpuSMI)

func (XpuSMI) LoadDashData

func (x XpuSMI) LoadDashData() ([]XPUSimpleInfo, error)

func (XpuSMI) LoadGpuInfo

func (x XpuSMI) LoadGpuInfo() (*XpuInfo, error)

Jump to

Keyboard shortcuts

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