Skip to content

GPU trace-gen (part 2): 7 more device-resident fills + preprocessed-table GPU LDE#811

Draft
ColoCarletti wants to merge 5 commits into
tracegen-gpufrom
tracegen-gpu-tables-pt2
Draft

GPU trace-gen (part 2): 7 more device-resident fills + preprocessed-table GPU LDE#811
ColoCarletti wants to merge 5 commits into
tracegen-gpufrom
tracegen-gpu-tables-pt2

Conversation

@ColoCarletti

Copy link
Copy Markdown
Collaborator

Builds on part 1 (#803). Extends the device-resident trace-gen seam to the rest of the per-op tables and moves the remaining tables' LDE onto the GPU.

What this PR does

7 more table fills go device-resident (built directly in VRAM, feeding the LDE/commit with no host upload, same seam as part 1):

EQ, BYTEWISE, MUL, DVRM (ALU) · BRANCH · CPU32 · MEMW (general)

With part 1 this puts the entire per-op arithmetic / control / memory family on GPU (14 tables total).

Preprocessed tables now LDE on GPU. The 6 lookup tables that commit two Merkle trees (BITWISE, DECODE, PAGE, GLOBAL_MEMORY, REGISTER, KECCAK_RC) can't use the device full-column Merkle, so their fill + Merkle stay on host, but the LDE (the dominant cost) now runs on GPU every proof via a new no-Merkle device LDE path.

Net: essentially all main-trace fill + LDE now runs on GPU.

Also: dedupes the per-table dispatchers into one gpu_build_tables<T> helper, and moves the GPU fill-parity tests out of production code into prover/src/tests/gpu_fill_tests.rs.

Correctness

  • Per-table byte-parity (multiset for the order-independent dedup ALU tables) between each device fill and its CPU generate_*_trace — 14 tests, all green on RTX 5090.
  • e2e prove → verify green, incl. the preprocessed GPU-LDE (proofs with BITWISE/DECODE LDE'd on device still verify; the static-root assert is unchanged and the opening path is untouched).

Performance

  • ~4.2% faster on ethrex-10tx (device fills, GPU-on vs CPU-on kill-switch A/B); the preprocessed GPU-LDE is on top of that.

What's left for future PRs

  • Trace-gen stages 1–5 on GPU — the memory-model walk is the biggest remaining lever.
  • The precompile / continuation tables (COMMIT, HALT, KECCAK×3, ECSM, ECDAS, LOCAL_TO_GLOBAL) — low row-count, low value.

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