Files
foxhunt/crates/ml-alpha/Cargo.toml
jgrusewski d3b60b2ef3 build(ml-alpha): multi-cubin build.rs + placeholder kernels + local MappedF32Buffer
Cargo.toml: drops gbdt; adds memmap2 + approx; keeps ml-core only
(cannot depend on ml: would cycle since ml depends on ml-alpha for
the Mamba2 gate baseline).

build.rs: compiles 7 cubins (mamba2_alpha + 6 new placeholders)
with -O3 --use_fast_math --ftz --fmad. Skips kernels whose source
isn't present yet so partial check-ins work. Every env::var paired
with rerun-if-env-changed per the canonical build pearl.

src/pinned_mem.rs: local copy of MappedF32Buffer (mirrors
ml::cuda_pipeline::mapped_pinned::MappedF32Buffer). Drives the only
permitted CPU<->GPU path per feedback_no_htod_htoh_only_mapped_pinned.
Eventually the move-to-ml-core refactor will deduplicate; out of
scope for the Phase A branch.

Addendum: updates the import path to ml_alpha::pinned_mem.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 21:35:35 +02:00

48 lines
1.7 KiB
TOML

[package]
name = "ml-alpha"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
description = "CfC perception + multi-horizon alpha heads (Phase A foundation for CfC+PPO greenfield)"
publish = false
# Phase A scope: snapshot-level CfC trunk + 5 multi-horizon BCE heads,
# pre-compiled CUDA cubins, GPU-resident weights. The hard validation gate
# (CfC vs Mamba2 AUC at every horizon) sits at the end of Phase A. Phase B
# (PPO) extends this crate; live integration lives in trading_agent_service.
[features]
default = ["cuda"]
cuda = []
[dependencies]
ml-core = { workspace = true }
# NOTE: cannot depend on `ml` (would cycle — ml depends on ml-alpha for the
# mamba2_block gate reference). MappedF32Buffer is duplicated locally in
# `src/pinned_mem.rs`; eventually we should move mapped-pinned to ml-core.
cudarc = { version = "0.19", default-features = false, features = ["driver", "cublas", "dynamic-linking", "std", "cuda-version-from-build-system", "f16"] }
# Standard async + error + logging plumbing
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "fs", "io-util"] }
anyhow.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
serde.workspace = true
serde_json.workspace = true
thiserror.workspace = true
clap = { workspace = true, features = ["derive"] }
# Arrow IPC for fxcache reading (gate reference path).
arrow = { workspace = true, features = ["ipc"] }
# Deterministic RNG for weight init, shuffling.
rand = { workspace = true }
rand_chacha = "0.3"
# Phase A data path: mmap predecoded MBP-10 sidecars.
memmap2 = { workspace = true }
[dev-dependencies]
tempfile = { workspace = true }
approx = { workspace = true }