tuning

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package tuning computes the nodewright tuning-status matrix: for each (service, accelerator) the catalog resolves, which tuning profile is applied and the pinned versions of the nodewright nvidia-setup / nvidia-tuned / nvidia-tuning-gke packages. It is hermetic and offline — every input is a pure read of the embedded recipe catalog and component manifests (no network, no cluster). tools/tuning renders the Report as Markdown; make tuning-docs splices it into docs/integrator/components/nodewright.md.

Index

Constants

View Source
const NotApplicable = "-"

NotApplicable is the marker for a Profile equal to the accelerator, or for an absent Setup/Tuning package pin. Exported so the renderer (tools/tuning) reuses one definition instead of duplicating the literal.

View Source
const SchemaVersion = "1.0.0"

SchemaVersion is the version of the Report schema.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Provider is the recipe DataProvider to enumerate and resolve against.
	// Nil selects the package-global embedded catalog (hermetic).
	Provider recipe.DataProvider
	// Version stamps the recipe builder version used during resolution.
	Version string
	// Filter narrows enumeration to leaves matching every set criteria dimension.
	Filter *recipe.Criteria
}

Options configures a Compute run.

type PackagePin

type PackagePin struct {
	Name    string
	Version string
}

PackagePin identifies a pinned nodewright package (by image basename) and its version. The zero value renders as "-" (no package).

type Report

type Report struct {
	SchemaVersion string
	Rows          []Row
}

Report is the catalog-wide tuning-status snapshot.

func Compute

func Compute(ctx context.Context, opts Options) (*Report, error)

Compute resolves every leaf recipe, extracts the nodewright tuning/setup pins applied for its (service, accelerator), and returns a deterministic Report. Rows are collapsed by (service, accelerator) with a consistency check: if two leaves in the same group disagree on the applied pins/profile, Compute fails loud rather than silently picking one.

type Row

type Row struct {
	Service     string
	Accelerator string
	Profile     string
	Setup       PackagePin
	Tuning      PackagePin
}

Row is one (service, accelerator) tuning-status entry.

Jump to

Keyboard shortcuts

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