library

package
v0.4.159 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check_gpu

func Check_gpu() ([]models.Gpu, error)

func GetGPUInfo

func GetGPUInfo() ([][]GPUInfo, error)

func GetTotalProvisioned

func GetTotalProvisioned() *models.Provisioned

GetTotalProvisioned returns Provisioned struct with provisioned memory and CPU.

func Hz_per_cpu

func Hz_per_cpu() float64

fetches the max clock speed of a single core Assuming all cores have the same clock speed

Types

type GPUInfo

type GPUInfo struct {
	GPUName     string
	TotalMemory uint64
	UsedMemory  uint64
	FreeMemory  uint64
	Vendor      GPUVendor
}

func GetAMDGPUInfo

func GetAMDGPUInfo() ([]GPUInfo, error)

func GetNVIDIAGPUInfo

func GetNVIDIAGPUInfo() ([]GPUInfo, error)

type GPUVendor

type GPUVendor int
const (
	Unknown GPUVendor = iota
	NVIDIA
	AMD
)

func DetectGPUVendors

func DetectGPUVendors() ([]GPUVendor, error)

func (GPUVendor) String

func (g GPUVendor) String() string

Jump to

Keyboard shortcuts

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