Skip to content

feat(experimental): add GPU-native hierarchical trace manipulation#2762

Draft
ibgreen-openai wants to merge 3 commits into
masterfrom
codex/gpu-trace-manipulation
Draft

feat(experimental): add GPU-native hierarchical trace manipulation#2762
ibgreen-openai wants to merge 3 commits into
masterfrom
codex/gpu-trace-manipulation

Conversation

@ibgreen-openai

@ibgreen-openai ibgreen-openai commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Goals

  • Move dynamic hierarchical trace manipulation, filtering, dependency focus, and layout onto the GPU.
  • Provide a realistic, reusable foundation for hierarchical process/thread and linked-span exploration without CPU readback in the rendering hot path.

Architecture

GPU-native trace manipulation pipeline: canonical trace data flows through GPU mask filtering, hierarchy and graph operations, and indirect GPU rendering.

Changes

  • Add and export four reusable GPU command-graph primitives: GPUMask, GPUGraphTraversal, GPUHierarchyLayout, and GPUAncestorProjection.
  • Support stable mask composition over GPU data and chunk-preserving GPU vectors; bounded, cycle-safe forward, reverse, and bidirectional CSR traversal; GPU-scanned process/thread expansion; and nearest-visible hidden-parent projection.
  • Replace the trace example with deterministic canonical span records, stable source identities, process/thread hierarchies, sparse cross-process dependencies, forward/reverse adjacency, classification, and topology flags.
  • Add GPU-native status, duration, runtime, error, and topology filtering; interactive process/thread collapse; focused multi-hop linked-span selection; projected dependency rendering; atomic picking; activity aggregation; and fixed indirect draws.
  • Add real Chromium/WebGPU primitive and interactive-viewer integration tests, deterministic Node tests, four API reference pages, navigation, and updated example documentation.

Verification

  • yarn lint fix
  • yarn lint
  • yarn build
  • yarn workspace luma.gl-examples-experimental-gpu-trace-viewer build
  • yarn website:build
  • (cd website && yarn build)
  • yarn test-headless modules/experimental/test/gpu-primitives/gpu-trace-manipulation.spec.ts test/examples/gpu-trace-viewer.spec.ts
  • yarn test-node test/examples/gpu-trace-viewer.node.spec.ts
  • yarn website-debug --example experimental/gpu-trace-viewer --backend webgpu-core --headless: live WebGPU adapter, successful viewer rendering, and zero console, page, or request errors.
  • The repository pre-commit hook independently passed formatting/lint and the full Node suite: 181 passed, 2 skipped.

Existing full-suite limitation

yarn test passes all 181 Node tests and 1,283 browser tests, but reports one existing failure in modules/arrow-layers/test/layers/arrow-layers.spec.ts: Arrow polygon and text layers render storage-backed WebGPU models expects a drawable storage-backed polygon instance. The identical failure was independently reproduced against the original checkout, with no GPU trace changes, and is unrelated to this PR.

@ibgreen-openai
ibgreen-openai force-pushed the codex/gpu-trace-manipulation branch from cc69263 to 71863b5 Compare July 25, 2026 20: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