Skip to content

feat(experimental): add live CPU and WebGPU graph benchmarks - #2958

Open
ibgreen-openai wants to merge 3 commits into
codex/lugraph-spatial-force-layoutfrom
codex/lugraph-live-benchmarks
Open

feat(experimental): add live CPU and WebGPU graph benchmarks#2958
ibgreen-openai wants to merge 3 commits into
codex/lugraph-spatial-force-layoutfrom
codex/lugraph-live-benchmarks

Conversation

@ibgreen-openai

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

Copy link
Copy Markdown
Collaborator

Goals

  • Provide explicit-start, trustworthy CPU-versus-real-WebGPU graph benchmarks for every delivered luGraph analysis and layout path.
  • Keep benchmark-only code completely outside the production experimental root and main luGraph runtime bundles.

Changes

  • Add isolated optional @luma.gl/experimental/lugraph/benchmarks ESM/CommonJS/types exports and a reusable runLuGraphBenchmark(device, options) API.
  • Generate deterministic sparse, dense, scale-free, disconnected, and high-degree graph datasets while preserving original nonempty/empty/nonempty source edge batches.
  • Implement independent CPU oracles for directed CSR, bounded BFS with deterministic predecessors, weak components, normalized dangling-aware PageRank, exact force integration, and genuinely approximated near/far spatial forces.
  • Execute the matching six actual GPU implementations, reject incorrect outputs before reporting measurements, and wait on real GPU completion fences for every timed submission.
  • Report observed minimum/median/p95/max CPU times, encoding overhead, fence-synchronized GPU timings, optional genuine hardware timestamps, imported/transient memory, and approximation error without inventing missing measurements.
  • Expose actual GPU weak-component convergence, real compiled iteration budgets, and the actual final PageRank L1 residual without fabricating convergence timing or adding GPU submissions.
  • Time source upload, graph compilation, explicit correctness readback, and a separately fenced standalone GPU spatial-index rebuild independently; expose actual caller-owned index memory.
  • Add an SSR-safe, explicit-click LiveBenchmarkPanel with all five graph families, selectable sizes, graceful missing-WebGPU behavior, and updated accurate spatial-acceleration API documentation.
  • Add Node isolation/dataset/CPU-oracle regressions plus actual Chromium/WebGPU execution of all five dataset families, all six GPU algorithms, and independently fenced index builds.

Verification

  • nvm use: passed; Node v22.22.1.
  • yarn install: attempted but registry returns HTTP 403 for unpublished/uncached dev-tools dependencies. Used an isolated APFS copy-on-write clone of an existing compatible dependency tree; no lockfile/dependency changes.
  • yarn lint fix: passed after final changes; 1,566 files checked.
  • yarn build: passed, including distinct dist/lugraph/benchmarks ESM/CJS/type outputs.
  • Focused Node benchmark/CPU-oracle tests: 44 passed.
  • Focused actual Chromium/WebGPU tests: all five graph families passed across all six GPU algorithms.
  • Complete pre-commit Node suite: 1,019 passed, 1 skipped.
  • yarn examples:typecheck: passed across 46 example workspaces.
  • yarn bundle-size: all seven production bundle ceilings passed.
  • yarn test: passed on the final propagated head; 1,019 Node tests and 1,707 actual Chromium/WebGPU browser tests passed (25 browser tests skipped).
  • yarn website:build: passed on the final propagated head.
  • (cd website && yarn build): passed on the final propagated head.

Risks

  • Timings are explicitly browser/device-specific; they are never presented as general performance guarantees.
  • Dense and exact-force workloads intentionally remain bounded because they can be quadratic.
  • Spatial output is independently validated against its actual CPU approximation; the separately reported error compares that approximation with exact forces.

@ibgreen-openai
ibgreen-openai marked this pull request as ready for review August 5, 2026 02:41
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