mirror of
https://github.com/hanzoai/engine.git
synced 2026-11-20 14:17:52 +00:00
quantized_qwen, _qwen3, _qwen3_moe and quantized_minimax all take QRmsNorm::forward_of_sum every layer, and nothing compared it to hanzo_kernel::norm::add_rmsnorm_ref — the kernel DSL's authoritative CPU definition of the op. rmsnorm_numeric.rs looks like it covers this and does not: it gates the ROCm kernel against an engine-internal composite built from a separate add and hanzo_nn::ops::rms_norm, so both of its sides live in this dependency tree. A drift from the DSL's definition is invisible to a test that never leaves the tree it is checking. This one crosses the repo boundary, which is the only place the disagreement could show up.
214 lines
7.1 KiB
TOML
214 lines
7.1 KiB
TOML
[package]
|
|
name = "hanzo-engine"
|
|
readme = "../README.md"
|
|
authors = ["Hanzo AI"]
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
description.workspace = true
|
|
repository.workspace = true
|
|
keywords.workspace = true
|
|
categories.workspace = true
|
|
license.workspace = true
|
|
homepage.workspace = true
|
|
|
|
[lib]
|
|
name = "hanzo_engine"
|
|
path = "src/lib.rs"
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
memmap2 = "0.9"
|
|
sha1 = "0.10"
|
|
sha3 = "0.10"
|
|
hanzo-ml.workspace = true
|
|
hanzo-nn.workspace = true
|
|
hanzo-transformers.workspace = true
|
|
hanzo-3d.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
hanzo-flash-attn = { workspace = true, optional = true }
|
|
dirs.workspace = true
|
|
hf-hub.workspace = true
|
|
thiserror.workspace = true
|
|
tokenizers.workspace = true
|
|
tqdm.workspace = true
|
|
chrono.workspace = true
|
|
minijinja.workspace = true
|
|
minijinja-contrib.workspace = true
|
|
either.workspace = true
|
|
indexmap.workspace = true
|
|
mime_guess = { workspace = true }
|
|
half.workspace = true
|
|
accelerate-src = { workspace = true, optional = true }
|
|
intel-mkl-src = { workspace = true, optional = true }
|
|
tracing.workspace = true
|
|
rand.workspace = true
|
|
rand_distr.workspace = true
|
|
regex-automata.workspace = true
|
|
rustc-hash.workspace = true
|
|
vob.workspace = true
|
|
cfgrammar.workspace = true
|
|
lrtable.workspace = true
|
|
galil-seiferas.workspace = true
|
|
clap.workspace = true
|
|
radix_trie.workspace = true
|
|
bytemuck.workspace = true
|
|
rayon.workspace = true
|
|
tokio.workspace = true
|
|
tokio-rayon.workspace = true
|
|
rand_isaac.workspace = true
|
|
futures.workspace = true
|
|
pyo3 = { workspace = true, optional = true }
|
|
indicatif.workspace = true
|
|
async-trait.workspace = true
|
|
toml.workspace = true
|
|
strum.workspace = true
|
|
image.workspace = true
|
|
derive_more = { workspace = true}
|
|
akin.workspace = true
|
|
variantly.workspace = true
|
|
tracing-subscriber.workspace = true
|
|
derive-new.workspace = true
|
|
itertools.workspace = true
|
|
sysinfo.workspace = true
|
|
hanzo-vision.workspace = true
|
|
csv.workspace = true
|
|
reqwest.workspace = true
|
|
base64.workspace = true
|
|
ed25519-dalek.workspace = true
|
|
bytemuck_derive.workspace = true
|
|
hanzo-paged-attn = { workspace = true, optional = true }
|
|
hanzo-quant.workspace = true
|
|
hanzo-train.workspace = true
|
|
uuid = { workspace = true, features = ["v4"] }
|
|
utoipa = { workspace = true, optional = true }
|
|
schemars.workspace = true
|
|
serde-saphyr.workspace = true
|
|
regex.workspace = true
|
|
serde_plain.workspace = true
|
|
as-any.workspace = true
|
|
float8.workspace = true
|
|
llguidance.workspace = true
|
|
toktrie_hf_tokenizers.workspace = true
|
|
toktrie.workspace = true
|
|
hanzo-flash-attn-v3 = { workspace = true, optional = true }
|
|
safetensors.workspace = true
|
|
serde-big-array.workspace = true
|
|
interprocess.workspace = true
|
|
urlencoding.workspace = true
|
|
scraper.workspace = true
|
|
html2text.workspace = true
|
|
tokio-tungstenite.workspace = true
|
|
http.workspace = true
|
|
ordered-float.workspace = true
|
|
hashbrown.workspace = true
|
|
parking_lot.workspace = true
|
|
ahash.workspace = true
|
|
num-traits.workspace = true
|
|
libc.workspace = true
|
|
bm25.workspace = true
|
|
rubato.workspace = true
|
|
rustfft.workspace = true
|
|
hound.workspace = true
|
|
apodize.workspace = true
|
|
symphonia.workspace = true
|
|
hanzo-audio.workspace = true
|
|
rust-mcp-schema.workspace = true
|
|
hanzo-llm-mcp = { workspace = true, features = ["utoipa"] }
|
|
hanzo-code-exec = { workspace = true, optional = true }
|
|
hanzo-sandbox.workspace = true
|
|
statrs.workspace = true
|
|
openai-harmony = "0.0.8"
|
|
|
|
[target.'cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))'.dependencies]
|
|
objc = { workspace = true, optional = true }
|
|
objc2-metal = { workspace = true, optional = true }
|
|
hanzo-metal-kernels = { workspace = true, optional = true }
|
|
|
|
[features]
|
|
# Compile-strip trace!/debug! from release binaries (true zero-cost noop in prod).
|
|
# OFF by default so trace!/debug! stay runtime-gated — near-free when RUST_LOG is
|
|
# unset, and available in *release* builds for debug-in-release (needed for big
|
|
# models too slow to run in a debug profile). Shipped prod builds add this feature:
|
|
# cargo build --release --features strip-logs
|
|
# Then `RUST_LOG=...=trace` shows nothing because the macros are gone at compile time.
|
|
strip-logs = ["tracing/release_max_level_info"]
|
|
pyo3_macros = ["pyo3", "hanzo-llm-mcp/pyo3_macros"]
|
|
# ZAP internal RPC surface (binary wire for engine<>node). Message + adapter
|
|
# layer only; no capnp build dep. The real capnp-rpc wire is a `zap-capnp`
|
|
# sub-feature, see src/zap/transport.rs.
|
|
zap = []
|
|
cuda = [
|
|
"hanzo-ml/cuda",
|
|
"hanzo-nn/cuda",
|
|
"dep:cudaforge",
|
|
"hanzo-quant/cuda",
|
|
"dep:hanzo-paged-attn",
|
|
"hanzo-paged-attn/cuda",
|
|
]
|
|
cudnn = ["hanzo-ml/cudnn"]
|
|
cutile = ["cuda", "hanzo-quant/cutile"]
|
|
vulkan = [
|
|
"hanzo-ml/vulkan",
|
|
"hanzo-nn/vulkan",
|
|
"hanzo-quant/vulkan",
|
|
"dep:hanzo-paged-attn",
|
|
"hanzo-paged-attn/vulkan",
|
|
]
|
|
wgpu = ["hanzo-ml/wgpu", "hanzo-quant/wgpu"]
|
|
rocm = [
|
|
"hanzo-ml/rocm",
|
|
"hanzo-nn/rocm",
|
|
"hanzo-quant/rocm",
|
|
"dep:hanzo-paged-attn",
|
|
"hanzo-paged-attn/rocm",
|
|
]
|
|
metal = [
|
|
"hanzo-ml/metal",
|
|
"hanzo-nn/metal",
|
|
"hanzo-quant/metal",
|
|
"dep:hanzo-metal-kernels",
|
|
"dep:objc",
|
|
"dep:hanzo-paged-attn",
|
|
"hanzo-paged-attn/metal",
|
|
"dep:objc2-metal"
|
|
]
|
|
flash-attn = ["cuda", "dep:hanzo-flash-attn"]
|
|
flash-attn-v3 = ["cuda", "dep:hanzo-flash-attn-v3", "hanzo-flash-attn-v3/cuda"]
|
|
# Max-opt CUDA in one feature (bare `cuda` omits these). metal/vulkan bundle their opts already.
|
|
cuda-full = ["cuda", "flash-attn", "cudnn"]
|
|
accelerate = ["hanzo-ml/accelerate", "hanzo-nn/accelerate", "hanzo-quant/accelerate"]
|
|
mkl = ["hanzo-ml/mkl", "hanzo-nn/mkl"]
|
|
nccl = ["cuda", "hanzo-quant/nccl"]
|
|
utoipa = ["dep:utoipa"]
|
|
ring = ["hanzo-quant/ring"]
|
|
code-execution = ["dep:hanzo-code-exec"]
|
|
# License gate: when on, the server-init path calls license::load_and_verify() and refuses to
|
|
# serve on any failure. OFF by default so dev/CLI/perf/test runs are not gated.
|
|
license-enforce = []
|
|
# Which app_id this engine build accepts. Exactly one should be set for a release build; if none is
|
|
# set the build defaults to the permissive dev app_id ("hanzo-dev"). These are mutually exclusive in
|
|
# intent (license.rs picks the first that is enabled).
|
|
license-app-hanzo = []
|
|
license-app-lux = []
|
|
license-app-zoo = []
|
|
|
|
[build-dependencies]
|
|
cudaforge = { workspace = true, optional = true }
|
|
|
|
[dev-dependencies]
|
|
# The DSL's CPU oracle for the gated delta-rule scan, so the GDN kernel hanzo-kernel lowers to every
|
|
# backend is gated against THIS crate's `recurrence_portable` rather than only against itself.
|
|
# `default-features = false` keeps cubecl's runtime backends out of the test build: `gdn_scan_ref` is
|
|
# plain f32 Rust, so no GPU and no lowering engine is pulled in.
|
|
#
|
|
# Pinned exactly, and NOT to the newest release: 0.2.40 and 0.2.41 are the only versions published
|
|
# after the `#[kernel]` macro learned to rewrite a bare `island! { .. }` statement, and both resolve
|
|
# hanzo-kernel-macros 0.1.1 from the registry, which predates that rewrite -- so `island!` survives
|
|
# expansion and neither version compiles for anyone outside the ml workspace (19 errors, "cannot find
|
|
# macro `island`"). Relax to a caret range once a macros release carrying the rewrite exists.
|
|
hanzo-kernel = { version = "=0.2.20", default-features = false }
|
|
|
|
tempfile = "3"
|