This release is a pre-release and may not be stable for production use.
Trellis
GPU acceleration that stays honest: probe the machine → budget memory → validate the launch → run — with coded errors, a doctor, and no silent “CPU as GPU peak.”
Research codename was Lattice. Product / import / CLI:
trellis(ADR D01). PyPI distribution:heddura(pip install heddura→import trellis).
What Trellis is / is not
| Is | Is not |
|---|---|
| Intent→Structure→Schedule→Resource→ISA conductor + MemoryBudget + CSM | A new general-purpose language |
| Multi-vendor doors with honest L0–L5 outcomes | Peak-everywhere |
| Stock → cache → generate → escape | A replacement for cuBLAS / FlashAttention / NCCL |
| Spark-class CUDA software bar + exceed via all compute sources | ZLUDA-class CUDA translation |
| Beachhead: sim + PyTorch interop | A game engine / graphics middleware |
Architecture (one screen)
Intent (map/stencil/…)
→ Structure (components/packs)
→ Schedule (tile/fuse/…)
→ Resource (MemoryBudget, streams, parallel_map plans)
→ Conductor: stock → cache → generate → escape
→ ISA / door (CUDA · CPU · HIP scaffold · WebGPU floors)
CSM/doctor probes sparse capabilities (no invented warp/TMEM)
Why Trellis
- Safety modes (
strict/balanced/expert) bound MemoryBudget headroom validate()rejects illegal / zero-occupancy launches before you ship a kernel- Conductor prefers stock libraries (cuBLAS) when available — and only then may label
gpu_peak=true - One native CUDA door backs Python, C, C++, and Rust (no dual-stack drift)
- Doctor / CSM read real device props (
warp_sizefrom the GPU — never hardcoded)
Gold-standard checklist: docs/GOLD_STANDARD.md · Authority: ROADMAP.md §A · Queue: §C.
Status
Φ0 complete · Φ1 advancing · Φ2 draft (legal-only Peak). Product 0.1.0rc15. Not bare v0.1.0 — public CUDA 2-SKU wheels / multi-GPU CI (§8.6) still open.
Door × outcome (honest matrix)
| Door | Typical outcome | Notes |
|---|---|---|
| CUDA | L2–L4 when toolkit+driver | Spark software bar = CTK 13+; see SPARK.md |
| CPU | Always L2 oracle | Never gpu_peak |
| HIP | Scaffold / refuse | Instinct-first checklist |
| WebGPU | Floors only | Never peak |
| NPU peers | Detect-only | No fake SIMT |
Full taxonomy: WORLD_GPU_COMPATIBILITY.md.
Quickstart — Python
From PyPI (import stays trellis):
python -m pip install heddura
From a clone (editable / extras):
python -m pip install -e ".[dev,interop]"
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build
$env:TRELLIS_LIB_DIR = "$PWD\build"
$env:CUDA_PATH = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" # optional
trellis doctor --json
python scripts/support_bundle.py -o support_bundle.json
import trellis
ctx = trellis.Context(device=0, safety="strict") # or device="cpu"
x = ctx.alloc((64, 64), dtype="float32")
x.fill_ramp()
y = trellis.stencil(ctx, x, schedule={"tile": (16, 16)})
z = trellis.parallel_map(ctx, x, fn="relu", strategy="auto")
print(trellis.sources()["best"])
Peak honesty: generate kernels set gpu_peak=false. Stock cuBLAS (gemm_like) may set gpu_peak=true.
Tutorials
python examples/01_first_op.py
python examples/02_components.py
python examples/03_schedule_roofline.py
python examples/04_dlpack_interop.py
python scripts/repro_beachhead.py
python docs/e2e/run_phi1_smoke.py
Contributing / support
Hard rules
- Never invent
warp_size— probe CSM / CUDA attrs - Never label CPU as GPU peak
- Never skip
validate()before launch - Do not replace cuBLAS / FlashAttention / NCCL with DIY “stock”
- No ZLUDA-class CUDA translation
License
Apache-2.0 — see LICENSE and NOTICE.
Release files for heddura 0.1.0rc15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| heddura-0.1.0rc15.tar.gz | 239.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| heddura-0.1.0rc15-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 334.1 kB
Release files / heddura-0.1.0rc15.tar.gz
| Download URL | heddura-0.1.0rc15.tar.gz |
|---|---|
| Size | 239.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f50bb49a8a9726575d67d51c59c9f9370a77fa42ed239cc3458207b00bce3734
|
|
BLAKE2b-256 checksum How to use checksums |
9f79526b3cc3d84323fcc2b03e9b0444833143803f8977a9a346414d3f1fa6f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / heddura-0.1.0rc15-py3-none-any.whl
| Download URL | heddura-0.1.0rc15-py3-none-any.whl |
|---|---|
| Size | 94.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d1352eb713fc56da11fe5dda231ecd65c6fd674b09865f8294f97c7bad8fa1e8
|
|
BLAKE2b-256 checksum How to use checksums |
6704042b9e2df8534eceecd9bc093ace89e1911526541381796411e2613d2b52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|