Skip to content
Merged

#34 #41

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions docs/_includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,21 @@
<a href="{{ "/examples/reduce_example.html" | relative_url }}">Reduce</a>
<span class="nav-dropdown-heading">Configurable</span>
<a href="{{ "/examples/scan_pane_example.html" | relative_url }}">Scan / Reduce (Pane)</a>
<span class="nav-dropdown-heading">Performance</span>
<a href="{{ "/examples/scan_sort_perf.html" | relative_url }}">Scan / Sort Performance</a>
<a href="{{ "/examples/reduce_perf.html" | relative_url }}">Reduce Performance</a>
<span class="nav-dropdown-heading">Regression</span>
<a href="{{ "/examples/regression.html" | relative_url }}">Regression Tests</a>
</div>
</div>

<!-- Performance link + dropdown -->
<div class="nav-dropdown">
<a class="page-link nav-dropdown-toggle" href="{{ "/performance/" | relative_url }}">Performance ▾</a>
<div class="nav-dropdown-content">
<span class="nav-dropdown-heading">Benchmarks</span>
<a href="{{ "/examples/scan_sort_perf.html" | relative_url }}">Scan / Sort</a>
<a href="{{ "/examples/reduce_perf.html" | relative_url }}">Reduce</a>
</div>
</div>

<!-- Demos link + dropdown -->
<div class="nav-dropdown">
<a class="page-link nav-dropdown-toggle" href="{{ "/demos/" | relative_url }}">Demos ▾</a>
Expand Down
10 changes: 7 additions & 3 deletions docs/_includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ <h3>Examples</h3>
<li><a href="{{ "/examples/reduce_example.html" | relative_url }}">Reduce</a></li>
<li class="nav-section-heading">Configurable</li>
<li><a href="{{ "/examples/scan_pane_example.html" | relative_url }}">Scan / Reduce (Pane)</a></li>
<li class="nav-section-heading">Performance</li>
<li><a href="{{ "/examples/scan_sort_perf.html" | relative_url }}">Scan / Sort Performance</a></li>
<li><a href="{{ "/examples/reduce_perf.html" | relative_url }}">Reduce Performance</a></li>
<li class="nav-section-heading">Regression</li>
<li><a href="{{ "/examples/regression.html" | relative_url }}">Regression Tests</a></li>
</ul>
{%- elsif page.sidebar == "performance" -%}
<h3>Performance</h3>
<ul class="docs-nav">
<li class="nav-section-heading">Benchmarks</li>
<li><a href="{{ "/examples/scan_sort_perf.html" | relative_url }}">Scan / Sort</a></li>
<li><a href="{{ "/examples/reduce_perf.html" | relative_url }}">Reduce</a></li>
</ul>
{%- else -%}
<h3>Documentation</h3>
{%- assign gridwise_pages = site.pages | where: "category", "gridwise" | sort: "order" -%}
Expand Down
25 changes: 0 additions & 25 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,6 @@ validate the output.
<a href="{{ "/examples/scan_pane_example.html" | relative_url }}" class="doc-btn">Open Example</a>
<a href="https://github.com/gridwise-webgpu/gridwise/blob/main/examples/scan_pane_example.mjs" target="_blank" class="doc-btn">Source</a>

## Performance Testing

These examples benchmark Gridwise primitives over a range of input sizes (logarithmically spaced)
and plot throughput in GB/s versus input length. Both CPU and GPU timing are reported. See the
[timing strategy documentation]({{ "/timing-strategy/" | relative_url }}) for how
primitives are timed and how to interpret results.

### Scan and Sort Performance

Benchmarks scan, reduce, and sort over a configurable range of input sizes. Choose the primitive,
datatype, and sort direction; results are plotted after each run. Note that sort overwrites its
input, so repeated trials measure a partially-sorted array.

<a href="{{ "/examples/scan_sort_perf.html" | relative_url }}" class="doc-btn">Open Example</a>
<a href="https://github.com/gridwise-webgpu/gridwise/blob/main/examples/scan_sort_perf.mjs" target="_blank" class="doc-btn">Source</a>

### Reduce Performance

Benchmarks the reduce primitive over a configurable range of input sizes. Explains the
warmup-then-trials timing strategy with inline code excerpts showing how to call
`getTimingResult` after execution.

<a href="{{ "/examples/reduce_perf.html" | relative_url }}" class="doc-btn">Open Example</a>
<a href="https://github.com/gridwise-webgpu/gridwise/blob/main/examples/reduce_perf.mjs" target="_blank" class="doc-btn">Source</a>

## Regression Testing

### Gridwise Regression Tests
Expand Down
31 changes: 31 additions & 0 deletions docs/performance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
layout: page
title: Performance
permalink: /performance/
sidebar: performance
---

Benchmarks for Gridwise primitives over a range of input sizes (logarithmically spaced),
plotting throughput in GB/s versus input length. Both CPU and GPU timing are reported. See the
[timing strategy documentation]({{ "/timing-strategy/" | relative_url }}) for how
primitives are timed and how to interpret results.

## Scan and Sort Performance

Benchmarks scan, reduce, and sort over a configurable range of input sizes. Choose the primitive,
datatype, and sort direction; results are plotted after each run. Note that sort overwrites its
input, so repeated trials measure a partially-sorted array.

<a href="{{ "/examples/scan_sort_perf.html" | relative_url }}" class="doc-btn">Open Example</a>
<a href="https://github.com/gridwise-webgpu/gridwise/blob/main/examples/scan_sort_perf.mjs" target="_blank" class="doc-btn">Source</a>

## Reduce Performance

Benchmarks the reduce primitive over a configurable range of input sizes. Explains the
warmup-then-trials timing strategy with inline code excerpts showing how to call
`getTimingResult` after execution.

<a href="{{ "/examples/reduce_perf.html" | relative_url }}" class="doc-btn">Open Example</a>
<a href="https://github.com/gridwise-webgpu/gridwise/blob/main/examples/reduce_perf.mjs" target="_blank" class="doc-btn">Source</a>

---
17 changes: 17 additions & 0 deletions examples/gridwise.css
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,20 @@ ul.test-list li.fail {
#large-section {
display: none;
}

.back-link {
display: inline-block;
padding: 5px 12px;
background: #39bda7;
color: white;
text-decoration: none;
border-radius: 4px;
margin-bottom: 1em;
font-size: 13px;
transition: background 0.2s;
}
.back-link:hover {
background: #2a9a87;
color: white;
text-decoration: none;
}
1 change: 1 addition & 0 deletions examples/reduce_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/>
</head>
<body>
<a href="/gridwise/examples/" class="back-link">← Back to Examples</a>
<h1>Gridwise Reduce Primitive Example</h1>
<p>
This example calls Gridwise's <code>reduce</code> primitive. You can look
Expand Down
1 change: 1 addition & 0 deletions examples/reduce_perf.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" />
</head>
<body>
<a href="/gridwise/performance/" class="back-link">← Back to Performance</a>
<h1>Reduce Performance</h1>
<p>
This example is a self-contained use of the <code>reduce</code>
Expand Down
1 change: 1 addition & 0 deletions examples/regression.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<link rel="stylesheet" href="gridwise.css" />
</head>
<body>
<a href="/gridwise/examples/" class="back-link">← Back to Examples</a>
<h1>Gridwise Regression Tests</h1>
<ul id="test-list" class="test-list"></ul>
<div id="summary" class="summary">Running…</div>
Expand Down
1 change: 1 addition & 0 deletions examples/scan_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/>
</head>
<body>
<a href="/gridwise/examples/" class="back-link">← Back to Examples</a>
<h1>Gridwise Scan Primitive Example</h1>
<p>
This example calls Gridwise's <code>scan</code> primitive. You can look at
Expand Down
1 change: 1 addition & 0 deletions examples/scan_pane_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<link rel="stylesheet" href="gridwise.css" />
</head>
<body>
<a href="/gridwise/examples/" class="back-link">← Back to Examples</a>
<h1>Scan / Reduce Example, with Configuration Pane</h1>
<div id="instructions">
<p>Set your parameters in the pane and click "Start" to run and validate a WebGPU scan/reduce.</p>
Expand Down
1 change: 1 addition & 0 deletions examples/scan_sort_perf.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" />
</head>
<body>
<a href="/gridwise/performance/" class="back-link">← Back to Performance</a>
<h1>Scan / Sort Performance</h1>
<p>
This example is a self-contained use of the <code>scan</code> and
Expand Down
1 change: 1 addition & 0 deletions examples/sort_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/>
</head>
<body>
<a href="/gridwise/examples/" class="back-link">← Back to Examples</a>
<h1>Gridwise Sort Primitive Example</h1>
<p>
This example calls Gridwise's <code>sort</code> primitive. You can look at
Expand Down