Skip to content

feat(experimental): add GPU PageRank with dangling redistribution - #2946

Merged
ibgreen-openai merged 1 commit into
masterfrom
codex/lugraph-pagerank
Aug 7, 2026
Merged

feat(experimental): add GPU PageRank with dangling redistribution#2946
ibgreen-openai merged 1 commit into
masterfrom
codex/lugraph-pagerank

Conversation

@ibgreen-openai

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

Copy link
Copy Markdown
Collaborator

Goals

  • Add browser-native, GPU-resident PageRank node importance for interactive graph visualization and sizing.
  • Correctly handle incoming links, dangling vertices, damping, probability normalization, and explicit residual reporting without CPU synchronization or floating-point atomics.
  • Stack narrowly on the verified luGraph topology/traversal/component foundations in feat(experimental): compute GPU weakly connected components #2944.

Changes

  • Add LuGraphPageRank and LuGraphPageRankProps exclusively to @luma.gl/experimental/lugraph.
  • Implement directed incoming-CSR pull accumulation, with symmetric forward adjacency reused for undirected graphs.
  • Redistribute dangling-vertex probability mass every iteration, apply configurable damping/teleportation, and explicitly normalize the resulting probability vector.
  • Publish an optional caller-owned GPU-resident final-iteration L1 residual.
  • Introduce reusable bounded three-dimensional float32 workgroup-tree reductions with uniform barriers; avoid the existing reduction primitive's one-dimensional dispatch ceiling.
  • Reuse a single graph-owned float32 candidate workspace and one compact reduction hierarchy across dangling-mass, normalization, and final-residual reductions.
  • Fail closed on required forward/reverse overflow; empty graphs clear optional residual without division by zero.
  • Respect portable WebGPU storage-binding limits, reject physically aliased caller outputs, and preserve source ownership/chunk identities.
  • Define the metric as unweighted even when topology retains optional edge weights.
  • Add 54 focused Node contracts and 23 real-WebGPU CPU-oracle scenarios covering dangling vertices, damping zero/one, reverse pull, normalization, final residual, overflow, repeated encoding, byte offsets, and actual hierarchical [2,2,2] dispatch.

Verification

  • nvm use: passed (Node v22.22.1).
  • yarn install: attempted normally and with escalation; configured registry blocks 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,548 files).
  • Final yarn build: passed across every workspace after the final code/formatting changes.
  • Focused Node PageRank tests: 54 passed.
  • Focused real Chromium/WebGPU PageRank tests: 23 passed.
  • Complete CI=1 yarn test: 806 Node tests and 1,649 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; LuGraphPageRank remains absent from the experimental root.
  • Normal commit hooks: lint and all 806 Node tests passed.

Risks and follow-up

  • Scores use native float32 and deterministic workgroup-tree reductions; expected tolerances account for floating-point rounding and unsorted incoming CSR accumulation order.
  • Directed PageRank requires explicitly constructed reverse adjacency; existing edge weights are intentionally not interpreted as transition probabilities.
  • The implementation never claims native floating-point atomics, subgroup requirements, float64 precision, or automatic CPU fallback.
  • Stacked on feat(experimental): compute GPU weakly connected components #2944; target codex/lugraph-connected-components until prerequisites land.

@ibgreen-openai
ibgreen-openai marked this pull request as ready for review August 5, 2026 01:50
@ibgreen-openai
ibgreen-openai force-pushed the codex/lugraph-connected-components branch 2 times, most recently from 528be42 to 8e6ec66 Compare August 6, 2026 14:44
Base automatically changed from codex/lugraph-connected-components to master August 6, 2026 14:55
@ibgreen-openai
ibgreen-openai force-pushed the codex/lugraph-pagerank branch 3 times, most recently from 38872bb to 1cbe6a3 Compare August 6, 2026 23:00
@ibgreen-openai
ibgreen-openai force-pushed the codex/lugraph-pagerank branch from 1cbe6a3 to 9cb4627 Compare August 7, 2026 00:00
@ibgreen-openai
ibgreen-openai merged commit d0a4983 into master Aug 7, 2026
6 checks passed
@ibgreen-openai
ibgreen-openai deleted the codex/lugraph-pagerank branch August 7, 2026 00:21
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