# ZzCompute

- **Event:** [PyTorch Helion Hackathon](https://cerebralvalley.ai/e/helion-hackathon)
- **When:** Sat, Mar 14 at 9:00 AM – 10:00 PM (PDT)
- **Where:** Shack15, San Francisco, CA
- **Team:** [Nihal Nihalani](https://cerebralvalley.ai/u/nihalnihalani), [Ramis Hasanli](https://cerebralvalley.ai/u/ramizik)
- **GitHub:** https://github.com/pytorch/helion/pull/1707 https://github.com/pytorch/helion/pull/1706 https://github.com/pytorch/helion/pull/1703  https://github.com/pytorch/helion/pull/1701 https://github.com/pytorch/helion/pull/1695 https://github.com/pytorch/helion/pull/1694  https://github.com/pytorch/helion/pull/1692, https://github.com/pytorch/helion/pull/1711, https://github.com/pytorch/helion/pull/1710,   https://github.com/pytorch/helion/pull/1709, https://github.com/pytorch/helion/pull/1708, https://github.com/pytorch/helion/pull/1702,   https://github.com/pytorch/helion/pull/1691, https://github.com/pytorch/helion/pull/1690, https://github.com/pytorch/helion/pull/1689,   https://github.com/pytorch/helion/pull/1688, https://github.com/pytorch/helion/pull/1687, https://github.com/pytorch/helion/pull/1686,   https://github.com/pytorch/helion/pull/1685, https://github.com/pytorch/helion/pull/1684
- **Gallery:** https://cerebralvalley.ai/e/helion-hackathon/hackathon/gallery
- **Page:** https://cerebralvalley.ai/e/helion-hackathon/hackathon/gallery/11

1. Causal Conv1d — Depthwise Causal Convolution
Implements the core Mamba/Mamba-2 causal convolution where each channel is convolved independently with past context. The kernel tiles across batch, channels, and sequence length with filter width (W=4) specialized at compile time for loop unrolling. Boundary handling uses masked loads (hl.load with extra_mask) to avoid host-side padding. Autotuned configs optimize block sizes (1024–4096), L2 cache grouping, and pipeline stages for the memory-bound pattern on B200.

2. Gated DeltaNet Chunk Forward H — Inter-Chunk Recurrence
Implements the sequential bottleneck (Eq. 8), maintaining a K×V state across 64-timestep chunks. Parallelized across batch×head while processing chunks sequentially. Each step applies delta correction, exponential decay gating, and state accumulation. Uses IEEE float32 dot precision to prevent numerical drift. Dynamic shape fallback ensures correctness.

3. Gated DeltaNet Chunk Forward O — Output
Computes per-chunk outputs combining inter-chunk state queries and intra-chunk causal attention (Eq. 9). Chunks run fully in parallel. Optimizations include exp2, fused hl.dot(..., acc=) accumulation, and B200 ACF scheduling.

4. Gated DeltaNet Recompute W/U — WY Transform
Computes WY-transformed keys/values via two batched matmuls per chunk (Eq. 4–7). Uses exp2 gating and persistent-interleaved PID scheduling for high SM utilization. Single config passes all 12 shapes within the 12-minute compile limit.

---

Markdown version of https://cerebralvalley.ai/e/helion-hackathon/hackathon/gallery/11. Site index for agents: https://cerebralvalley.ai/llms.txt · full text: https://cerebralvalley.ai/llms-full.txt
