mirror of
https://github.com/hanzoai/ml.git
synced 2026-11-20 23:08:29 +00:00
The committed MSL under hanzo-ml/src/metal/dsl was extracted by hand: its docs cite tools/dsl/msl_extract.sh, which was never committed. kernel-gen replaces it. It launches each registered specialization on the target runtime with CUBECL_DEBUG_LOG pointed at a scratch file and keeps the source the runtime itself compiled. Offline define() is not usable because cubecl 0.10's KernelDefinition reads client.properties(). - cubecl-cpp declares mutable locals in hash-set order (5 runs on dbc M4 Max gave 2 orders for gemv). gen::canonicalize sorts each run of bare declarations; 8/8 runs are now byte-identical. - kernel-gen --target metal --check passes. gemv is unchanged; rms_norm_blk differs only in local numbering, and hanzo-ml dsl_metal_dispatch + metal_dsl_board pass 4/4 on dbc. - dispatch_dsl compiled MSL -> library -> pipeline on every call. MetalDevice::dsl_pipeline caches it per device. 4/4 still pass. - Vendor cubecl-cpp 0.10.0 with one HANZO PATCH: a bitcast of a literal lowered to reinterpret_cast<T const&>(rvalue), which MSL rejects, so any DSL kernel using quant::f16lo_to_f32 failed to compile on Metal. hanzo-ml consumes the generated artifacts, so only the hanzo-kernel workspace needs the patch.
113 lines
2.2 KiB
TOML
113 lines
2.2 KiB
TOML
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
|
|
#
|
|
# When uploading crates to the registry Cargo will automatically
|
|
# "normalize" Cargo.toml files for maximal compatibility
|
|
# with all versions of Cargo and also rewrite `path` dependencies
|
|
# to registry (e.g., crates.io) dependencies.
|
|
#
|
|
# If you are reading this file be aware that the original Cargo.toml
|
|
# will likely look very different (and much more reasonable).
|
|
# See Cargo.toml.orig for the original contents.
|
|
|
|
[package]
|
|
edition = "2024"
|
|
name = "cubecl-cpp"
|
|
version = "0.10.0"
|
|
authors = ["nathanielsimard <[email protected]>"]
|
|
build = false
|
|
autolib = false
|
|
autobins = false
|
|
autoexamples = false
|
|
autotests = false
|
|
autobenches = false
|
|
description = "CPP transpiler for CubeCL"
|
|
readme = "README.md"
|
|
keywords = [
|
|
"cpp",
|
|
"gpu",
|
|
"cuda",
|
|
"hip",
|
|
"metal",
|
|
]
|
|
categories = ["science"]
|
|
license = "MIT OR Apache-2.0"
|
|
repository = "https://github.com/tracel-ai/cubecl/tree/main/crates/cubecl-cpp"
|
|
resolver = "2"
|
|
|
|
[features]
|
|
cuda = []
|
|
default = [
|
|
"cubecl-runtime/default",
|
|
"cubecl-common/default",
|
|
"cubecl-core/default",
|
|
"metal",
|
|
]
|
|
hip = []
|
|
metal = []
|
|
std = [
|
|
"cubecl-runtime/std",
|
|
"cubecl-common/std",
|
|
"cubecl-core/std",
|
|
]
|
|
tracing = [
|
|
"cubecl-runtime/tracing",
|
|
"cubecl-common/tracing",
|
|
"cubecl-core/tracing",
|
|
"cubecl-opt/tracing",
|
|
]
|
|
|
|
[lib]
|
|
name = "cubecl_cpp"
|
|
path = "src/lib.rs"
|
|
|
|
[dependencies.bytemuck]
|
|
version = "1.16.1"
|
|
|
|
[dependencies.cubecl-common]
|
|
version = "0.10.0"
|
|
default-features = false
|
|
|
|
[dependencies.cubecl-core]
|
|
version = "0.10.0"
|
|
default-features = false
|
|
|
|
[dependencies.cubecl-opt]
|
|
version = "0.10.0"
|
|
default-features = false
|
|
|
|
[dependencies.cubecl-runtime]
|
|
version = "0.10.0"
|
|
features = ["channel-mutex"]
|
|
default-features = false
|
|
|
|
[dependencies.derive-new]
|
|
version = "0.7.0"
|
|
default-features = false
|
|
|
|
[dependencies.half]
|
|
version = "2.5"
|
|
features = [
|
|
"alloc",
|
|
"num-traits",
|
|
"serde",
|
|
]
|
|
default-features = false
|
|
|
|
[dependencies.itertools]
|
|
version = "0.14.0"
|
|
default-features = false
|
|
|
|
[dependencies.log]
|
|
version = "^0.4.22"
|
|
default-features = false
|
|
|
|
[lints.clippy]
|
|
doc_markdown = "warn"
|
|
|
|
[lints.rust]
|
|
warnings = "warn"
|
|
|
|
[lints.rustdoc]
|
|
broken_intra_doc_links = "warn"
|
|
invalid_html_tags = "warn"
|