Expand description
Atlas CUDA kernel PTX modules.
Single source of truth for embedded PTX. The spark-runtime
(pure Rust engine) and benchmarks consume these.
PTX modules are grouped by KernelTarget — each (H, M_q)
tuple maps to a distinct set of hyperoptimized kernels.
Constants, ptx_modules(), and all_ptx_sets() are auto-generated
by build.rs from the kernels/{hw}/{model}/{quant}/ directories.
When ATLAS_TARGET_MODEL=* or ATLAS_TARGET_QUANT=*, multiple
targets are compiled and available at runtime.
Re-exports§
pub use resolve::ResolveCandidate;pub use resolve::TargetResolveError;pub use resolve::ptx_for_config;pub use resolve::ptx_for_exact_target;
Modules§
- resolve
- Kernel-target resolution: which compiled target serves a checkpoint.
Structs§
- Dflash
Config - DFlash speculative-decoding pairing for a target model.
Parsed from
[dflash]in MODEL.toml at build time.Nonewhen the model has no DFlash drafter associated. - Model
Behavior - Model-specific behavior flags from MODEL.toml
[behavior]. - Model
Type Match - Declares which
(model_type, hidden_size)pairs a kernel target supports. Parsed from[[model_types]]in MODEL.toml at build time. - Sampling
Category - Per-category sampling defaults from MODEL.toml.
- Sampling
Presets - Model-specific sampling presets loaded from MODEL.toml
[sampling.*]. - Target
PtxSet - Kernel modules hyperoptimized for a specific (H, M_q) target.
Constants§
- DECODE_
DOMAIN - Domain salt folded into every decode cold-tier key so a decode-ring blob can never collide with a Marconi prefix-hash key on a shared store/peer.
- DECODE_
ROLLBACK_ RING_ SLOTS - Phase-C: number of boundary SSM-state snapshots retained per sequence in
the decode-rollback ring (hybrid GDN/Mamba models). DECOUPLED from
ROLLBACK_RESTEER_CAP: the cap bounds how many times we re-steer, but the ring must retain enough boundary snapshots that a clean PRE-loop boundary survives long enough to roll back to. Sizing it at the oldCAP + 1 = 3meant a loop spanning ≥3 sentence/newline boundaries evicted the clean boundary before the fuzzy detector (3 repeats) fired, forcing aNoSsmSnapshotdecline → hard-stop (observed: Claude-Code @ nvfp4-head, 2026-06-07). 8 covers the 3-repeat detector with margin at modest cost (8 × max_batch × per-layer GDN state, allocated once). Pure-attention models ignore this (their ring is 0; they roll back to any boundary). - DEFAULT_
EFFORT_ CAPPED_ AT_ CEILING - Default
[behavior].effort_capped_at_ceiling— whether qualitativereasoning_effortlevels are clamped at the model’s effective ceiling E (max_thinking_budget/--max-thinking-budget). - DEFAULT_
MAX_ INTER_ TOOL_ PROSE - Default cap on free-text tokens between successive tool calls on a
tool-armed request (
[behavior].max_inter_tool_prose). - DEFAULT_
MAX_ THINKING_ BUDGET - Default
[behavior].max_thinking_budget— the effort-ladder anchor E and the budget for budgetless thinking-on requests. 256 is the historical built-in every model inherited before MODEL.toml could override it. Lifted here (2026-08-14, effort-ladder work) because it was three hand-synced literals (lib.rs default, build-parse default, build-parseunwrap_or) — the exact drift shape that shipped #328’s 384-vs-3072 bug. - KERNEL_
SET_ HASH - Content fingerprint of the generated kernel set, emitted by
build.rsas arustc-env. Referencing it here makes cargo recompile this crate whenever the kernel set changes — closing theinclude!-not-tracked staleness hole that silently embedded a stale module list (the 98-vs-99 regression). - ROLLBACK_
RESTEER_ CAP - Phase-C: maximum number of watchdog-triggered rollbacks a single sequence may perform before the watchdog reverts to a hard stop. Bounds the worst case where re-steering re-enters the same attractor — without this a degenerate sequence could rollback indefinitely.
- TARGET_
CLOSURES - What each kernel target in THIS binary was compiled from, as JSON.
Functions§
- all_
ptx_ sets - available_
targets - All compiled kernel targets and their PTX module sets.
- metallib_
modules - ptx_
for_ model - Find the PTX module set for a target whose model name contains
needle. - ptx_
modules