[package] name = "rtx-kernel-bench" version = "0.1.0" edition = "2024" description = "Kernel benchmarking framework for comparing CubeCL vs hand-crafted implementations" license = "MIT OR Apache-2.0" repository = "https://github.com/anthropics/rustytorch" keywords = ["gpu", "benchmark", "cuda", "kernel", "performance"] categories = ["development-tools::profiling", "science"] [dependencies] # Core dependencies rtx-backend = { path = "../../core/rtx-backend" } rtx-backend-cpu = { path = "../../core/rtx-backend-cpu" } # GPU backends for real kernel benchmarks rtx-metal = { path = "../../core/rtx-metal", optional = true } # rtx-kernel = { path = "../../core/rtx-kernel", optional = true } # TODO: Wire up when CUDA ready # CubeCL for GPU kernel compilation (0.9.x restructured crates) cubecl = { workspace = true, optional = true } cubecl-wgpu = { workspace = true, optional = true } cubecl-cuda = { workspace = true, optional = true } cubecl-hip = { workspace = true, optional = true } cubecl-matmul = { workspace = true, optional = true } # Replaces cubecl-linalg cubecl-reduce = { workspace = true, optional = true } cubecl-runtime = { workspace = true, optional = true } bytemuck = { workspace = true } # CUDA for hand-crafted NVIDIA kernels cudarc = { workspace = true, optional = true } # Benchmarking criterion = { version = "0.5", features = ["html_reports"] } # Statistics and analysis statistical = "1.0" # Async runtime tokio = { version = "1", features = ["rt-multi-thread", "macros", "time"] } # Utilities anyhow = "1.0" thiserror = "2" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" chrono = { version = "0.4", features = ["serde"] } tracing = "0.1" # CLI for benchmark runner clap = { version = "4", features = ["derive"] } # Tables for output tabled = "0.15" comfy-table = "7" # Colors for terminal output colored = "2" [dev-dependencies] rand = "0.8" [features] default = [] cuda = ["rtx-backend/cuda", "dep:cudarc"] # Hand-crafted CUDA kernels via cudarc metal = ["rtx-backend/metal", "dep:rtx-metal"] wgpu = ["dep:cubecl", "dep:cubecl-wgpu", "dep:cubecl-matmul", "dep:cubecl-reduce", "dep:cubecl-runtime"] # CubeCL GPU via WGPU/Metal cubecl-cuda = ["dep:cubecl", "dep:cubecl-cuda", "dep:cubecl-matmul", "dep:cubecl-reduce", "dep:cubecl-runtime"] # CubeCL → CUDA PTX rocm = ["dep:cubecl", "dep:cubecl-hip", "dep:cubecl-matmul", "dep:cubecl-reduce", "dep:cubecl-runtime"] # CubeCL → HIP/ROCm [[bin]] name = "kernel-bench" path = "src/bin/main.rs" [[bin]] name = "compare-kernels" path = "src/bin/compare_kernels.rs" [lints] workspace = true