Expand description
Self-substrate — vyre using its own primitives to compile/dispatch vyre.
These modules realize the recursion thesis (#30): every Tier-2.5
primitive shipped in vyre-primitives also has a vyre-self consumer
here that uses the same Program at compile / dispatch time.
§Layering (audit cleanup A10, 2026-04-30)
Extracted from vyre-driver/src/self_substrate/ into a dedicated
crate so the substrate-self-uses live at a layer that depends only
on vyre-foundation + vyre-primitives — eliminating the layering
muddle where backend-specific dispatch code and substrate self-uses
shared one home in vyre-driver.
vyre-foundation
↑
vyre-primitives
↑
vyre-self-substrate ← THIS CRATE (no driver deps)
↑
vyre-driver / vyre-runtime / vyre-libs / vyre-driver-{cuda,wgpu}No cycles. Every consumer above this crate reaches the substrate
via vyre_self_substrate::* directly.
vyre-foundation cannot consume self_substrate from here because
self_substrate depends on vyre-primitives which depends on
vyre-foundation — that’s the cycle that justifies the dedicated
crate. Foundation has its own smaller substrate at
vyre_foundation::pass_substrate (with the math kernels it needs
inlined locally — same pattern Linux uses for arch-local libs vs
lib/).
§Module list
dataflow_fixpoint(#26) — Region-graph dataflow fixpoint viavyre-primitives::math::semiring_gemmover the Region adjacency.cost_model(#28) — probabilistic dispatch cost model viavyre-primitives::graph::sum_product_circuit+ conformal intervals fromvyre-primitives::math::conformal.vsa_fingerprint(#29) — VSA op-cache key viavyre-primitives::hash::hypervector.spectral_schedule(#23) — spectral clustering of dispatch graph viavyre-primitives::graph::chebyshev_filter+vyre-primitives::math::spectral_shape.differentiable_autotune(#27) — differentiable autotuner viavyre-primitives::math::differentiable.polyhedral_fusion(#19) — polyhedral / affine fusion viavyre-primitives::math::semiring_gemmon the affine-dependency adjacency.megakernel_schedule(#22) — megakernel ILP relaxation viavyre-primitives::opt::homotopycontinuation.tensor_train_chain_fusion(#6) — chain-shaped Region fusion viavyre-primitives::math::tensor_train::tt_contract_stepcontraction.do_calculus_change_impact(#36) — rule-graph change-impact analysis viavyre-primitives::graph::do_calculusgraph surgery.scallop_provenance(#39) — GPU-resident rule provenance closure viavyre-primitives::math::scallop_joinDatalog fixpoint.matroid_megakernel_scheduler(#46) — discrete fusion-grouping via matroid intersection augmenting paths. Complementsmegakernel_schedule(#22 homotopy continuous solver) with the exact combinatorial selection.mori_zwanzig_region_coarsen(#58) — Region-tree coarse-graining via Mori-Zwanzig projection. Reduces O(N²) all-pairs analyses to O(K²) at workspace scale with quantified projection error.fmm_polyhedral_compress(#51) — FMM hierarchical compression of #19 polyhedral fusion’s all-pairs affinity. Drops cost from O(N²) to O(N log N) at workspace scale.submodular_cache_eviction(#45) — pipeline-cache eviction via submodular maximization. Replaces LRU’s heuristic with the provably-(1-1/e) greedy approximation.qsvt_matrix_function_fusion(#34) — transport-based fusion analysis via QSVT-applied matrix functions. Computes Wasserstein distances on dispatch graphs in O(K·N²) instead of O(N³).persistent_homology_loop_signature(#15) — Region-tree loop topology via Vietoris-Rips filtration. Fusion-vs-fission decision informed by H₁ persistent features.adjustment_set_pass_dependency(#37) — optimizer pass-ordering validity via causal back-door analysis on the rewrite-precondition graph.functorial_pass_composition(#52) — IR transform passes as categorical functors. Compositionality, equational reasoning, free adjoint pairs — pass framework moves from hand-managed DAG to a typed functor-category.string_diagram_ir_rewrite(#53) — Vyre IR Region tree IS a string diagram in Cat(GPU buffers, Programs). Optimizer rewrites become string-diagram rewrites; coherence theorems give free correctness proofs.planar_rewrite_pass_scheduler(#11) — schedule batch IR rewrites onto disjoint sub-trees via planar non-overlapping selection. Drops dispatch count from O(N) sequential to O(log N) batched.
Modules§
- adjustment_
set_ pass_ dependency - Optimizer pass-ordering validity via causal adjustment-set analysis.
- alias_
registry - Alias-registry substrate consumer.
- amg_
pass_ solver - Algebraic-multigrid V-cycle for matroid-intersection LP relaxation.
- bellman_
tn_ order - Tensor-network contraction order via shortest-path on the contraction-cost graph.
- bitset_
summary - Bitset summary substrate consumer.
- categorical_
check - Categorical-substrate consumer (P-PRIM-16/17/18).
- cost_
model - Probabilistic dispatch cost model via #10 sum_product_circuit (#28).
- csr_
bidirectional - Region-graph bidirectional one-step reach substrate consumer.
- csr_
forward_ or_ changed - In-place expand-with-change-flag substrate consumer.
- dataflow_
fixpoint - Region-graph dataflow fixpoint via #1 semiring_gemm (#26 substrate).
- decision_
telemetry - Substrate-decision telemetry (P-OBS-2).
- differentiable_
autotune - Differentiable autotuner via #7 differentiable softmax / argmax (#27).
- dnnf_
compile - d-DNNF compilation substrate consumer (P-PRIM-6).
- do_
calculus_ change_ impact - Rule-graph change-impact as a Pearl do-calculus query (#36 substrate).
- dominator_
frontier - Region-graph dominance-frontier substrate consumer.
- effect_
signature_ check - Effects-typed signature checker substrate consumer (P-PRIM-13).
- exploded
- Exploded-supergraph (IFDS encoding) substrate consumer.
- fmm_
polyhedral_ compress - Polyhedral-fusion all-pairs compression via #51 FMM (#19+#51 self-consumer).
- functorial_
pass_ composition - IR transform passes as categorical functors (#52 self-consumer).
- kfac_
autotune_ step - K-FAC step inside vyre’s natural-gradient autotuner.
- knowledge_
compile_ pass_ precondition - Pass-precondition compilation via #38 knowledge compilation (#38 self-consumer).
- level_
wave_ pass - Interprocedural callee-before-caller pass dispatch via #74 level_wave (#74 self-consumer).
- linear_
type_ check - Substructural-type discipline substrate consumer (P-PRIM-14).
- matroid_
exact_ megakernel - Exact (Edmonds) matroid intersection for megakernel fusion-grouping.
- matroid_
megakernel_ scheduler - Megakernel fusion-grouping via #46 matroid intersection (#22 self-consumer).
- megakernel_
schedule - Megakernel auto-scheduler via #9 homotopy continuation (#22).
- mori_
zwanzig_ region_ coarsen - Region-tree coarse-graining via #58 Mori-Zwanzig projection (#58 self-consumer).
- motif
- Region-graph motif-matching substrate consumer.
- multigrid_
matroid_ solver - Sparse linear-system solver for matroid intersection via #50 algebraic multigrid (#50 self-consumer).
- natural_
gradient_ autotuner - Autotuner gradient direction via #56 natural_gradient (#56 self-consumer).
- observability
- Substrate-call observability counters.
- path_
reconstruct - Path-reconstruction substrate consumer.
- persistent_
bfs - Multi-step BFS frontier expansion substrate consumer.
- persistent_
fixpoint_ program - Persistent-fixpoint Program builder for runtime and driver scheduling loops.
- persistent_
homology_ loop_ signature - Region-tree loop topology via #15 vietoris_rips (#15 self-consumer).
- planar_
rewrite_ pass_ scheduler - IR rewrite-batch scheduler via #11 planar_rewrite (#11 self-consumer).
- polyhedral_
fusion - Polyhedral / affine fusion via #1 semiring_gemm on the affine dependency adjacency (#19 substrate).
- qsvt_
matrix_ function_ fusion - Transport-based fusion analysis via #34 QSVT (#34 self-consumer).
- scallop_
provenance - GPU-resident rule-provenance tracking via #39 scallop_join (#39 substrate).
- scallop_
provenance_ wide - Provenance closure tracking up to W·32 source rules.
- shape_
smt_ check - Shape-predicate / liquid-type SMT substrate consumer (P-PRIM-15).
- sheaf_
heterophilic_ dispatch - Heterophilic dispatch-graph analysis via #31 sheaf diffusion (#31 self-consumer).
- sheaf_
spectral_ clustering - Sheaf-spectral clustering of dispatch graphs.
- sinkhorn_
dispatch_ clustering - Dispatch-graph clustering via #2 sinkhorn (#30 substrate).
- sinkhorn_
full_ clustering - Full Sinkhorn-balanced dispatch-graph clustering.
- spectral_
schedule - Spectral analysis of dispatch graph via #5 chebyshev_filter + #17 spectral_shape (#23 substrate).
- string_
diagram_ ir_ rewrite - Vyre IR Region tree as a string diagram (#53 self-consumer).
- submodular_
cache_ eviction - Pipeline-cache eviction via #45 submodular maximization (#45 self-consumer).
- tensor_
network_ fusion_ order - Re-export foundation substrate for unified fusion planning (Item #68).
- tensor_
train_ chain_ fusion - Tensor-train chain fusion analyzer (#6 substrate).
- tensor_
train_ compression - Tensor-train compression of the dispatch-graph cost tensor.
- toposort
- DAG topological-sort substrate consumer.
- union_
find_ emit - Union-find substrate consumer.
- vsa_
fingerprint - VSA-based op cache key via #13 hypervector primitives (#29).
- zx_
rewrite - ZX-rewriter substrate consumer (P-PRIM-5).