docs.rs failed to build teeny-kernels-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
teeny-kernels
CPU/GPU kernel implementations of teenygrad's nn layers (attention —
including a Flash Attention 2 forward/backward implementation — math ops, and graph lowering),
written against the teeny-triton DSL and compiled via teeny-compiler.
Prerequisites
- Rust: any stable or nightly toolchain to
cargo build/cargo docthis crate — no system-library dependency at build time (thecudafeature pulls inteeny-cuda, which does have a CUDA toolkit build requirement — see its README). - Compiling/running kernels at runtime needs the custom
teenyccompiler — seeteeny-compiler's README for thecargo-teeny/TEENYC_PATHsetup. - On Blackwell (sm_120) GPUs,
teenyc's default PTX version forsm_120amay be rejected by the installed driver's JIT compiler (PTX .version 8.6 does not support .target sm_120a); if so, setTEENYC_PTX_VERSION=87(seeteeny-compiler'sTEENYC_PTX_VERSIONenv var).
Benchmarks
benches/conv2d_bn_silu.rs compares the three fused Conv2d+BatchNorm+SiLU kernel variants
(scalar, channel-tiled, GEMM/tensor-core) across shapes that straddle the shape-based dispatch
thresholds in graph/mod.rs:
Needs a real CUDA device (same runtime teenyc requirement as above); results are written to
target/criterion/report/index.html.
Features
| Feature | Default | Description |
|---|---|---|
cuda |
✅ | Enables the teeny-cuda backend (requires the CUDA toolkit to build — see teeny-cuda's README). |
training |
✅ | Enables teeny-core's training feature passthrough. |
Getting started
[]
= "0"
License
Apache-2.0. See LICENSE-APACHE.