Skip to content

fix(experimental): scale GPU sort dispatches - #2956

Merged
ibgreen-openai merged 1 commit into
masterfrom
codex/ludf-scaled-sort
Aug 7, 2026
Merged

fix(experimental): scale GPU sort dispatches#2956
ibgreen-openai merged 1 commit into
masterfrom
codex/ludf-scaled-sort

Conversation

@ibgreen-openai

Copy link
Copy Markdown
Collaborator

Goals

Remove one-dimensional WebGPU dispatch limits from stable GPU bitonic/radix sorting while preserving the existing public sort and batch-sort APIs.

Changes

  • Reuse the existing guarded three-dimensional workgroup planner and invocation linearization across bitonic initialization, compare/exchange stages, final gather, radix classification, and radix scatter.
  • Propagate one device or internal synthetic dispatch limit into every nested radix GPUScan stage.
  • Preserve stable equal-key ordering, direction, padded bitonic networks, source offsets, out-of-place ownership, empty/single-row fast paths, and GPUBatchSort chunk preservation.
  • Reject impossible padded workloads before mutating graphs or allocating scratch resources.
  • Add focused synthetic-device Node coverage and actual-WebGPU tests using only 1,025 rows and a dimension limit of two to validate [2, 2, 2] workgroups for both sorting algorithms.

Verification

  • nvm use — Node 22.22.1.
  • yarn install — enterprise registry blocks the existing alpha development-tool dependency with HTTP 403; reused previously verified ignored dependencies.
  • yarn lint fix — passed after final source changes.
  • yarn build — passed across every package after final formatting.
  • Focused Node sorting and existing primitive coverage — passed.
  • Focused actual WebGPU sorting — eight tests passed, including bounded 3D bitonic/radix dispatch and stable duplicate keys.
  • CI=1 yarn test — Node: 549 passed and one skipped; actual Chromium/WebGPU: 1,554 passed and 25 skipped.
  • yarn website:build — passed, including validation of 461 documentation pages.
  • (cd website && yarn build) — passed, including validation of 461 documentation pages.
  • yarn examples:typecheck — passed across all 46 example workspaces.
  • yarn bundle-size — passed all seven existing bundle budgets.

Risks and compatibility

  • Existing public APIs, sort direction/stability guarantees, physical buffer ownership, and one-dimensional workloads remain unchanged.
  • Synthetic dispatch-limit entry points remain internal; bitonic padded-capacity overflow and workloads beyond three-dimensional limits fail explicitly before partial graph mutation.
  • This independent prerequisite benefits every existing GPU sort consumer and unblocks large-dataframe sorting.

@ibgreen-openai
ibgreen-openai force-pushed the codex/ludf-scaled-sort branch from 219d9ef to a245c7e Compare August 6, 2026 18:44
@ibgreen-openai
ibgreen-openai merged commit ad658a5 into master Aug 7, 2026
4 of 7 checks passed
@ibgreen-openai
ibgreen-openai deleted the codex/ludf-scaled-sort branch August 7, 2026 00:53
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