impr: withPerformanceCallback on guardedComputePipeline#2424
impr: withPerformanceCallback on guardedComputePipeline#2424cieplypolar wants to merge 3 commits intomainfrom
Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:No major changes. 📋 All resultsClick to reveal the results table (350 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
Resolution Time Benchmark---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.83, 1.65, 3.23, 4.97, 6.34, 8.63, 18.46, 19.03]
line [0.84, 1.71, 3.55, 5.14, 6.28, 10.48, 19.56, 21.31]
line [0.76, 1.54, 3.55, 5.26, 5.93, 10.00, 17.69, 20.42]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.24, 0.43, 0.60, 0.74, 0.96, 1.05, 1.21, 1.34]
line [0.31, 0.50, 0.63, 0.80, 1.07, 1.10, 1.34, 1.47]
line [0.25, 0.48, 0.62, 0.76, 1.00, 1.07, 1.27, 1.41]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.79, 2.06, 4.16, 5.77, 10.44, 21.22, 45.93, 94.84]
line [0.81, 1.84, 3.69, 5.13, 10.51, 22.03, 48.93, 95.58]
line [0.64, 1.71, 3.15, 5.58, 10.53, 22.16, 45.77, 94.18]
|
There was a problem hiding this comment.
Pull request overview
Extends TgpuGuardedComputePipeline to support performance timing features by delegating withPerformanceCallback / withTimestampWrites to the underlying TgpuComputePipeline, and adds regression tests for the delegation behavior.
Changes:
- Add
withPerformanceCallbackandwithTimestampWritesto theTgpuGuardedComputePipelinepublic type. - Implement delegation in
TgpuGuardedComputePipelineImplby returning a new wrapper over the updated underlying pipeline. - Add vitest coverage to ensure the guarded wrapper calls through to the underlying pipeline methods.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/typegpu/tests/guardedComputePipeline.test.ts | Adds delegation tests for withPerformanceCallback and withTimestampWrites. |
| packages/typegpu/src/core/root/rootTypes.ts | Exposes the new guarded pipeline methods in the public API types and updates related docs. |
| packages/typegpu/src/core/root/init.ts | Implements the new guarded pipeline wrapper methods by delegating to the underlying compute pipeline. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@cieplypolar Is this ready for review? |
No description provided.