gpus

package
v0.0.0-...-fcfcbe3 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

README

The gpus package factors up some GPU-querying machinery we use across multiple projects.

Documentation

Overview

Package gpus provides a table of GPU vendor information, ported from Swarming: https://github.com/luci/luci-py/blob/887c873be30051f382da8b6aa8076a7467c80388/appengine/swarming/swarming_bot/api/platforms/gpu.py https://github.com/luci/luci-py/blob/887c873be30051f382da8b6aa8076a7467c80388/appengine/swarming/swarming_bot/api/platforms/win.py#L405

Index

Constants

View Source
const (
	AMD    = "1002"
	Nvidia = "10de"
	Intel  = "8086"
	VMWare = "15ad"
)

Variables

This section is empty.

Functions

func IDsToNames

func IDsToNames(vendorID VendorID, fallbackVendorName, deviceID, fallbackDeviceName string) (vendorName, deviceName string)

IDsToNames turns a vendor ID and device ID into human-readable names if possible, falling back to passed-in defaults for each one where it isn't.

Types

type VendorID

type VendorID string

func VendorNameToID

func VendorNameToID(name string) VendorID

VendorNameToID returns the vendor ID for a given GPU vendor name. If unknown, returns "".

func WindowsVendorAndDeviceID

func WindowsVendorAndDeviceID(pnpDeviceID string) (VendorID, string)

WindowsVendorAndDeviceID extracts the vendor ID and device ID from a Windows plug-and-play device ID string. If either is not found, it returns "UNKNOWN" for it.

Jump to

Keyboard shortcuts

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