Skip to content

Phase 8: softmax cell, tile dataflow, naive vs flash views - #5

Merged
deaneeth merged 1 commit into
mainfrom
feat/phase-8-levels
Oct 26, 2026
Merged

deaneeth merged 1 commit into
mainfrom
feat/phase-8-levels

Conversation

@deaneeth

Copy link
Copy Markdown
Member

Summary

Phase 8: the remaining levels of the visualizer.

  • L1 softmax cell: for a chosen row, the engine's running max, rescale and sum at each tile completion, next to the float softmax of the same INT8 inputs.
  • L2 tile dataflow: live values of the MM1 and MM2 arrays and the tile's S, Z, P, m, α, l and O, kept from the last busy clock.
  • L4 naive vs flash: two engine instances on the same inputs. HBM bytes, cycles, tiles and K/V loads are measured; footprint and occupancy are labelled formulas. Error grids against float attention, and an N sweep (4 to 32) of HBM bytes on seeded inputs.
  • Engine: new readouts tileDone and getDatapath(). No change to the datapath logic.

Verification

  • pnpm test:e2e (Playwright, production build): 12 passed. All four views at 375 px, the light and dark colour schemes, the NAIVE message.
  • pnpm test (Vitest): 15 passed.
  • node wasm/test.mjs: PASS, including one completion per FLASH tile and a non-decreasing row max within each group.
  • SEEDS=1 bash sim/run_e2e.sh: 3/3 passed (the full 200-seed sweep passed on main before this branch).
  • bash sim/lint.sh, pnpm lint, pnpm typecheck, pnpm build: clean.

Notes

  • The light-mode screenshots have not been reviewed by eye; the tests only check that the page renders with a background.
  • L2 shows the last busy clock's wires; between tiles the wires are idle.
  • The N sweep uses runToDone rather than a separate runFast.

…flash (L4)

Engine readouts: tileDone (one pulse per completed tile) and getDatapath (MM1 and MM2 weights,
activations and partial sums, live). Node test checks one completion per FLASH tile and that the
running row max never decreases within a row group.

L1 (SoftmaxCellView): the engine's row state at each tile completion for a chosen row, against
the float softmax of the same INT8 inputs. L2 (TileView): live datapath values, kept from the last
busy clock. L4 (CompareView): two engine instances on the same inputs; bytes, cycles, tiles and
K/V loads measured; footprint and occupancy as labelled formulas; error grids against float; an
N sweep (4 to 32) of HBM bytes on seeded inputs.

Layout: level tabs over the schedule view. Fixes found by the new checks: output values printed
as raw floats overflowed at 375 px; tile grids overhung by 1 px.

Playwright: 12 tests (all views at 375 px, the light and dark colour schemes, the NAIVE message).
Vitest: 15 tests. Docs: ARCHITECTURE section 13, STATE_SCHEMA, PLAN, CONTEXT, README.
@deaneeth
deaneeth merged commit 30d2f11 into main Oct 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant