Last updated: 2026-06-12

Hardware Detection

Diagnostics

All API Sections

Vulkan system diagnostics (`zinc --check`).

Probes the host environment, Vulkan driver, GPU capabilities, shader assets, and optional GGUF model fit to produce a human-readable preflight report on stdout.

5 exports 0 methods src/diagnostics.zig

5 exports shown

struct

Options

#
pub const Options = struct

Configuration for a Vulkan diagnostics run.

src/diagnostics.zig:20

struct

ManagedModelInfo

#
pub const ManagedModelInfo = struct

Catalog metadata for a managed (downloadable) model.

src/diagnostics.zig:34

struct

FitEstimate

#
pub const FitEstimate = struct

Estimated VRAM breakdown for running a model on a discrete GPU.

src/diagnostics.zig:125

function

run

#
pub fn run(opts: Options, allocator: std.mem.Allocator) !void

Run the five-step preflight diagnostics sequence and print a human-readable report to stdout.

Probes host OS, Vulkan driver, compiled shader assets, GPU device capabilities, and (optionally) a GGUF model file. Returns `error.DiagnosticsFailed` if any check is marked FAIL.

Parameters

opts
Diagnostic configuration: device index, optional model path, shader dir, etc.
allocator
Used for Vulkan device enumeration and model inspection scratch space.

src/diagnostics.zig:195

function

estimateFit

#
pub fn estimateFit(inspection: ModelInspection, vram_budget_bytes: u64, requested_context_length: ?u32) FitEstimate

Compute a `FitEstimate` that breaks down VRAM usage for a model at a given budget.

Derives weights, KV cache, SSM state, and runtime buffer sizes from the model config and returns per-category byte counts without evaluating fit status.

Parameters

inspection
GGUF model inspection result supplying tensor byte count and config.
vram_budget_bytes
Device-local VRAM available, as reported by the Vulkan driver.
requested_context_length
Optional context ceiling override; null uses the model default.

Returns

A `FitEstimate` with per-category byte counts and a budget-headroom context maximum.

src/diagnostics.zig:735