Skip to content

feat(experimental): compute GPU weakly connected components - #2944

Merged
ibgreen-openai merged 1 commit into
masterfrom
codex/lugraph-connected-components
Aug 6, 2026
Merged

feat(experimental): compute GPU weakly connected components#2944
ibgreen-openai merged 1 commit into
masterfrom
codex/lugraph-connected-components

Conversation

@ibgreen-openai

@ibgreen-openai ibgreen-openai commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Goals

  • Publish deterministic GPU-resident weakly connected component identifiers for direct graph coloring and community exploration.
  • Preserve the optional Arrow-free luGraph API and stack narrowly on deterministic shortest paths feat(experimental): add deterministic GPU graph shortest paths #2942.
  • Keep convergence and overflow state on GPU without implicit submission, CPU synchronization, or graph-owned scratch.

Changes

  • Add LuGraphConnectedComponents and LuGraphConnectedComponentsProps exclusively to @luma.gl/experimental/lugraph.
  • Compute weak connectivity for directed and undirected graphs using only forward CSR adjacency, symmetric integer-atomic root hooking, and explicitly synchronized pointer-jumping passes.
  • Publish each converged component's lowest stable vertex ID; preserve isolated vertices, duplicate edges, self-loops, and valid edges while excluding invalid endpoints.
  • Support caller-configured bounded iterations and an optional caller-owned GPU convergence scalar; status one means the final iteration proved a fixed point, while zero conservatively reports incomplete/overflowed work.
  • Fail closed on forward adjacency overflow using 0xffffffff labels; reverse adjacency and reverse overflow are deliberately irrelevant to weak connectivity.
  • Publish convergence one for valid empty graphs; support omitted convergence storage without allocating graph-owned transients.
  • Apply bounded three-dimensional dispatch and portable five-or-fewer storage bindings throughout initialization, hooking, pointer jumping, and globally synchronized convergence resets.
  • Validate packed caller-owned uint32 outputs and reject physical aliases against graph/topology allocations.
  • Add 45 focused Node contract tests and 19 real-WebGPU CPU-oracle scenarios covering directed weak connectivity without reverse CSR, canonical minimum IDs, conservative convergence, partial iteration, weighted/undirected graphs, overflow, repeated encoding, byte offsets, and actual [2,2,2] dispatch.

Verification

  • nvm use: passed (Node v22.22.1).
  • yarn install: attempted normally and with escalation; configured registry rejects unavailable dependencies with HTTP 403. Verification uses an isolated APFS-cloned compatible dependency tree and ignored Yarn state; no package/lockfile changes.
  • yarn lint fix: passed (1,544 files).
  • Final yarn build: passed across every workspace after final formatting and test changes.
  • Focused Node connected-components tests: 45 passed.
  • Focused real Chromium/WebGPU tests: 19 passed.
  • Complete CI=1 yarn test: 752 Node tests and 1,626 real Chromium/WebGPU tests passed; existing skips only.
  • yarn website:build: passed.
  • (cd website && yarn build): passed.
  • yarn examples:typecheck: all 46 example workspaces passed.
  • yarn bundle-size: all seven bundle-size budgets passed.
  • Built ESM and CommonJS package-subpath smoke checks: passed; LuGraphConnectedComponents remains absent from the experimental root.
  • Normal commit hooks: lint and all 752 Node tests passed.

Risks and follow-up

  • A convergence status of zero can conservatively include labels that became canonical during the final bounded iteration; status one guarantees a stable fixed point.
  • This implements weak—not strong—connected components. Directed edge orientation is intentionally ignored for component membership.
  • Atomic operations are integer-only; no floating-point atomics, device-wide shader barriers, CPU readbacks, or automatic fallback are introduced.
  • Stacked on feat(experimental): add deterministic GPU graph shortest paths #2942; target codex/lugraph-breadth-first-search until prerequisites land.

@ibgreen-openai
ibgreen-openai marked this pull request as ready for review August 5, 2026 01:30
@ibgreen-openai
ibgreen-openai force-pushed the codex/lugraph-breadth-first-search branch from d04afa1 to 4e68a80 Compare August 6, 2026 13:57
Base automatically changed from codex/lugraph-breadth-first-search to master August 6, 2026 14:02
@ibgreen-openai
ibgreen-openai force-pushed the codex/lugraph-connected-components branch from eb94354 to 528be42 Compare August 6, 2026 14:04
@ibgreen-openai
ibgreen-openai force-pushed the codex/lugraph-connected-components branch from 528be42 to 8e6ec66 Compare August 6, 2026 14:44
@ibgreen-openai
ibgreen-openai merged commit 2d69c31 into master Aug 6, 2026
8 checks passed
@ibgreen-openai
ibgreen-openai deleted the codex/lugraph-connected-components branch August 6, 2026 14:55
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