amdgpu

package
v1.25.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package amdgpu is a collection of utility functions to access various properties of AMD GPU via Linux kernel interfaces like sysfs and ioctl (using libdrm.)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AMDGPU

func AMDGPU(cardName string) bool

AMDGPU check if a particular card is an AMD GPU by checking the device's vendor ID

func DevFunctional

func DevFunctional(cardName string) bool

DevFunctional does a simple check on whether a particular GPU is working by attempting to open the device

func FamilyIDtoString

func FamilyIDtoString(familyId uint32) (string, error)

FamilyID to String convert AMDGPU_FAMILY_* into string AMDGPU_FAMILY_* as defined in https://github.com/torvalds/linux/blob/master/include/uapi/drm/amdgpu_drm.h#L986

func GetAMDGPUs

func GetAMDGPUs() map[string]map[string]int

GetAMDGPUs return a map of AMD GPU on a node identified by the part of the pci address

func GetCardFamilyName

func GetCardFamilyName(cardName string) (string, error)

func GetFirmwareVersions

func GetFirmwareVersions(cardName string) (map[string]uint32, map[string]uint32, error)

GetFirmwareVersions obtain a subset of firmware and feature version via libdrm amdgpu_query_firmware_version

func ParseTopologyProperties

func ParseTopologyProperties(path string, re *regexp.Regexp) (int64, error)

ParseTopologyProperties parse for a property value in kfd topology file The format is usually one entry per line <name> <value>. Examples in testdata/topology-parsing/.

Types

This section is empty.

Jump to

Keyboard shortcuts

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