S04 · Quantum & Scale · L-16

Online-Softmax Block

Difficulty
expert
Type
generation
Session
Deep
Stack
C++ gcc13-cpp20
Domain
AI Systems
Est. solve
~45 min

01 · The task

A tiled attention kernel is fully built except for its heart: the block-update step that folds each new tile of scores into a running softmax. Implement that one function so the streaming result matches a dense reference to tight tolerances — including the inputs crafted to wreck a naive approach.

02 · Constraints

  • Reference math provided

    The math and tiling helpers are given — write the one block.

  • One function

    The change is confined to a single block-update function.

03 · Skills exercised

gpu-free-attentionComputing attention/softmax on CPU with numerically stable tiling.tilingProcessing data in blocks to stay cache- and numerically-friendly.numerical-stabilityArranging computations to avoid overflow, NaNs, and catastrophic rounding.

How to playDaemon

The whole level runs through the local promptly daemon — it pulls the workspace, captures your token usage, tests locally, and submits the ranked run.

  1. Pair this machine

    One-time — approve the code under your devices.

    promptly pair
  2. Pull the workspace

    Downloads the starter kit into softmax/ and starts the solve clock — cd in before the next step.

    promptly init softmax
  3. Start the captured session

    Then drive your AI tool — the daemon meters every prompt and token live.

    promptly start
  4. Submit for ranked grading

    Runs the full hidden suite and ends the attempt.

    promptly submit

Or combine steps 02–03 into one commandShortcut

promptly play pulls the workspace, launches the daemon, and starts the captured session in a single step — the same as running init then start. Then cd softmax and drive your harness.

promptly play softmax