Expand description
Model-as-substrate (Phase 6, §F): one buffer holds a renderable manifold AND the transcoded
P64 weights; the renderer projects the manifold while the weights are co-resident. Gated to
where crate::p64_weight (the transcoder) compiles.
Phase 6 — model-as-substrate (graph–tensor duality, STELLAR §F).
The renderer’s acceptance for Phase 6: project a view of a manifold that also holds transcoded model weights — one substrate, one device. This module demonstrates exactly that: a single contiguous byte buffer co-locates
- a renderable manifold — a
Tensor10Dbuffer (tensor::buffer_export) the renderer projects throughrender::projection(the sameVolume3Dprojection the GPU viewport draws); and - a P64 weight section — produced by the streaming transcoder
(
p64_weight::transcode_safetensor_to_p64), loadable in place viaP64TensorIndex::from_p64.
One buffer, one device: the renderer projects the manifold while the weights are co-resident and mappable — the unification claim, end-to-end. (The deeper claim — that a single node is both a render primitive and a weight pointer — is the file-format-v2 work, STELLAR §C; here the two sections share one substrate, which is the testable Phase-6 gate.)
Structs§
- Substrate
Sections - Borrowed views of a substrate’s two co-located sections.
Constants§
- SUBSTRATE_
HEADER_ BYTES - Substrate header: magic(4) + version(2) + pad(2) + 4 × u64 section pointers = 40 bytes.
- SUBSTRATE_
MAGIC - Magic for the combined substrate header (“SUBQ”).
Functions§
- build_
model_ substrate - End-to-end (Gate A): transcode
safetensor_src→ co-locate it with a renderablegeometrymanifold in ONE substrate. Returns(substrate, transcode_report). - compose_
substrate - Co-locate a renderable manifold buffer + a P64 weights blob into one contiguous substrate.
- load_
weights - Load the co-resident weights section in place (zero-copy header/manifest parse).
- project_
manifold - The renderer’s view of the substrate: project every manifold node (
Volume3D) — exactly what the GPU viewport draws. Zero-copy over the manifold section. - read_
substrate - Parse a substrate header and return zero-copy slices of its two sections.