links

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type P2PLinkType

type P2PLinkType uint

P2PLinkType defines the link information between two devices.

const (
	P2PLinkUnknown P2PLinkType = iota
	P2PLinkCrossCPU
	P2PLinkSameCPU
	P2PLinkHostBridge
	P2PLinkMultiSwitch
	P2PLinkSingleSwitch
	P2PLinkSameBoard
	SingleNVLINKLink
	TwoNVLINKLinks
	ThreeNVLINKLinks
	FourNVLINKLinks
	FiveNVLINKLinks
	SixNVLINKLinks
	SevenNVLINKLinks
	EightNVLINKLinks
	NineNVLINKLinks
	TenNVLINKLinks
	ElevenNVLINKLinks
	TwelveNVLINKLinks
	ThirteenNVLINKLinks
	FourteenNVLINKLinks
	FifteenNVLINKLinks
	SixteenNVLINKLinks
	SeventeenNVLINKLinks
	EighteenNVLINKLinks
)

The following constants define the nature of a link between two devices. These include peer-2-peer and NVLink information.

func GetNVLink(dev1 device.Device, dev2 device.Device) (P2PLinkType, error)

GetNVLink gets the number of NVLinks between the specified devices.

func GetP2PLink(dev1 device.Device, dev2 device.Device) (P2PLinkType, error)

GetP2PLink gets the peer-to-peer connectivity between two devices.

func (P2PLinkType) String added in v0.3.1

func (l P2PLinkType) String() string

String returns the string representation of the P2PLink type.

type PciInfo

type PciInfo nvml.PciInfo

PciInfo is a type alias to nvml.PciInfo to allow for functions to be defined on the type.

func (PciInfo) BusID

func (p PciInfo) BusID() string

BusID provides a utility function that returns the string representation of the bus ID. Note that the []int8 slice member is named BusId.

func (PciInfo) CPUAffinity

func (p PciInfo) CPUAffinity() *uint

CPUAffinity returns the CPU affinity associated with a specified PCI device. If NUMA information is not available, this returns nil.

func (PciInfo) NumaNode

func (p PciInfo) NumaNode() int64

NumaNode returns the numa node associates with a PCI device. If numa is unsupported, -1 is returned.

Jump to

Keyboard shortcuts

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