Human-authored tinygrad work

Bounty #3039 Workbench

A scratchpad and test plan for Thomas to implement the associative-scan bounty himself, while keeping AI assistance outside the tinygrad code contribution.

$500 bounty · research/workbench only
Rule: do not copy AI-authored tinygrad code into the submission. Use this page for reasoning, test design, benchmarks, notes, and a human-authored implementation checklist.

Open bounty #3039 ↗ · Reference closed PR #17557 ↗

1. Understand the target

2. Correctness test matrix

  • lengths: 1, 2, 3, 5, 8, 17
  • forward and reverse
  • axis 0 and non-zero axis
  • integer + floating point
  • non-commutative matrix-prefix composition
  • compare to a simple sequential reference

Start with correctness before parallel-depth optimization.

3. Algorithm checkpoint

Candidate family: work-efficient tree/prefix scan. Your implementation should preserve operation order, handle non-power-of-two lengths, and expose enough parallelism that depth grows roughly logarithmically rather than linearly.

Write the algorithm yourself from primary references or your own derivation. Avoid lifting code from the abandoned AI-authored PR.

4. Benchmark plan

Your implementation notes

Notes and checklist state stay in this browser via localStorage.

Definition of done