hardware

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: Apache-2.0 Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package hardware detects the node's compute capability and produces the typesv1.CapabilityProfile sent at enrollment and in heartbeats.

Platform-specific probes live in build-tagged files (hw_darwin.go, hw_linux.go, hw_windows.go); this file holds the shared assembly.

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is stamped by the linker (goreleaser) and reported in the profile.

Functions

func AccelPreference added in v0.6.0

func AccelPreference(p *typesv1.CapabilityProfile) []string

AccelPreference returns the ordered accelerator chain the runtime artifact fetcher should try for this profile: the native backend of each detected GPU, then vulkan when it is available for that GPU's vendor, then the CPU build. Always non-empty; BestAccel is its head.

func BestAccel

func BestAccel(p *typesv1.CapabilityProfile) string

BestAccel returns the accelerator backend the runtime artifact fetcher should prefer for this profile.

func BestVRAMMB

func BestVRAMMB(p *typesv1.CapabilityProfile) uint64

BestVRAMMB returns the largest detected GPU memory (system RAM on Apple Silicon's unified memory); 0 when no usable GPU was found.

func Detect

func Detect(ctx context.Context, dataDir string) (*typesv1.CapabilityProfile, error)

Detect probes the local machine. Failures of individual probes degrade gracefully (e.g. no GPU -> CPU-only profile) rather than failing detection.

func DiskFreeBytes added in v0.4.0

func DiskFreeBytes(path string) (uint64, error)

DiskFreeBytes reports free space for unprivileged writes on the volume holding path (the model store's "free" figure in /api/v1/status).

Types

This section is empty.

Jump to

Keyboard shortcuts

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