Skip to content

feat(experimental): build shared GPU hash indexes from preserved batches - #2960

Merged
ibgreen-openai merged 1 commit into
masterfrom
codex/ludf-batch-hash-index
Aug 6, 2026
Merged

feat(experimental): build shared GPU hash indexes from preserved batches#2960
ibgreen-openai merged 1 commit into
masterfrom
codex/ludf-batch-hash-index

Conversation

@ibgreen-openai

Copy link
Copy Markdown
Collaborator

Goals

Build one reusable GPU hash index from streamed, independently owned record batches so hash joins can support multi-batch right-hand tables without implicit concatenation, repacking, CPU readback, or command submission.

Changes

  • Add public GPUBatchHashIndex, typed properties, and batch-aware storage statistics over ordered GraphVectorView<'uint32'> key chunks.
  • Support aligned per-chunk payload vectors or explicit per-batch stable source-row offsets, plus optional GPU validity masks.
  • Clear the shared table and diagnostics once, then insert/finalize each source chunk in order while preserving globally earliest duplicate selection and accumulating six GPU-resident statistics.
  • Exclude ordinary nulls silently; report valid reserved keys, duplicate valid keys, probe overflow, and bounded probe statistics explicitly.
  • Refactor existing single-batch GPUHashIndex build passes without changing its API or existing graph node identifiers.
  • Add focused Node and real-WebGPU regressions for [2,0,3] topology, mismatched chunks, discontinuous source offsets, sliced physical offsets, nullable rows, reserved keys, duplicates, capacity overflow, empty inputs, aliases, and repeated encoding.

Verification

  • nvm use: Node v22.22.1.
  • yarn install: not rerun; reused the already verified dependency tree because the existing enterprise alpha registry dependency returns HTTP 403.
  • yarn lint fix: passed after final changes.
  • yarn build: passed after final formatting.
  • yarn test: Node 550 passed/1 skipped; real Chromium/WebGPU 1,557 passed/25 skipped.
  • yarn test-node: 550 passed/1 skipped.
  • Focused new real-WebGPU tests: 4 passed; existing hash-index/hash-join integration: 15 passed.
  • yarn website:build and (cd website && yarn build): both passed and validated 461 documentation pages.
  • yarn examples:typecheck: all 46 workspaces passed.
  • yarn bundle-size: all seven budgets passed.

Risks

  • Reserved key 0xffffffff remains unsupported and is explicitly counted; null rows do not increment invalid-key diagnostics.
  • Existing single-batch GPUHashIndex behavior and public graph node IDs are preserved.
  • Source rows, buffers, and command submission remain caller owned.

@ibgreen-openai
ibgreen-openai merged commit 059a56b into master Aug 6, 2026
8 checks passed
@ibgreen-openai
ibgreen-openai deleted the codex/ludf-batch-hash-index branch August 6, 2026 20:24
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.

2 participants