Skip to content

Commit aeee0f2

Browse files
authored
Merge pull request #41 from jayshah1819/back-to-examples
#34
2 parents 5ac7594 + f841fa4 commit aeee0f2

6 files changed

Lines changed: 50 additions & 33 deletions

File tree

docs/_includes/header.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,21 @@
3535
<a href="{{ "/examples/reduce_example.html" | relative_url }}">Reduce</a>
3636
<span class="nav-dropdown-heading">Configurable</span>
3737
<a href="{{ "/examples/scan_pane_example.html" | relative_url }}">Scan / Reduce (Pane)</a>
38-
<span class="nav-dropdown-heading">Performance</span>
39-
<a href="{{ "/examples/scan_sort_perf.html" | relative_url }}">Scan / Sort Performance</a>
40-
<a href="{{ "/examples/reduce_perf.html" | relative_url }}">Reduce Performance</a>
4138
<span class="nav-dropdown-heading">Regression</span>
4239
<a href="{{ "/examples/regression.html" | relative_url }}">Regression Tests</a>
4340
</div>
4441
</div>
4542

43+
<!-- Performance link + dropdown -->
44+
<div class="nav-dropdown">
45+
<a class="page-link nav-dropdown-toggle" href="{{ "/performance/" | relative_url }}">Performance ▾</a>
46+
<div class="nav-dropdown-content">
47+
<span class="nav-dropdown-heading">Benchmarks</span>
48+
<a href="{{ "/examples/scan_sort_perf.html" | relative_url }}">Scan / Sort</a>
49+
<a href="{{ "/examples/reduce_perf.html" | relative_url }}">Reduce</a>
50+
</div>
51+
</div>
52+
4653
<!-- Demos link + dropdown -->
4754
<div class="nav-dropdown">
4855
<a class="page-link nav-dropdown-toggle" href="{{ "/demos/" | relative_url }}">Demos ▾</a>

docs/_includes/sidebar.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@ <h3>Examples</h3>
1414
<li><a href="{{ "/examples/reduce_example.html" | relative_url }}">Reduce</a></li>
1515
<li class="nav-section-heading">Configurable</li>
1616
<li><a href="{{ "/examples/scan_pane_example.html" | relative_url }}">Scan / Reduce (Pane)</a></li>
17-
<li class="nav-section-heading">Performance</li>
18-
<li><a href="{{ "/examples/scan_sort_perf.html" | relative_url }}">Scan / Sort Performance</a></li>
19-
<li><a href="{{ "/examples/reduce_perf.html" | relative_url }}">Reduce Performance</a></li>
2017
<li class="nav-section-heading">Regression</li>
2118
<li><a href="{{ "/examples/regression.html" | relative_url }}">Regression Tests</a></li>
2219
</ul>
20+
{%- elsif page.sidebar == "performance" -%}
21+
<h3>Performance</h3>
22+
<ul class="docs-nav">
23+
<li class="nav-section-heading">Benchmarks</li>
24+
<li><a href="{{ "/examples/scan_sort_perf.html" | relative_url }}">Scan / Sort</a></li>
25+
<li><a href="{{ "/examples/reduce_perf.html" | relative_url }}">Reduce</a></li>
26+
</ul>
2327
{%- else -%}
2428
<h3>Documentation</h3>
2529
{%- assign gridwise_pages = site.pages | where: "category", "gridwise" | sort: "order" -%}

docs/examples.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -54,31 +54,6 @@ validate the output.
5454
<a href="{{ "/examples/scan_pane_example.html" | relative_url }}" class="doc-btn">Open Example</a>
5555
<a href="https://github.com/gridwise-webgpu/gridwise/blob/main/examples/scan_pane_example.mjs" target="_blank" class="doc-btn">Source</a>
5656

57-
## Performance Testing
58-
59-
These examples benchmark Gridwise primitives over a range of input sizes (logarithmically spaced)
60-
and plot throughput in GB/s versus input length. Both CPU and GPU timing are reported. See the
61-
[timing strategy documentation]({{ "/timing-strategy/" | relative_url }}) for how
62-
primitives are timed and how to interpret results.
63-
64-
### Scan and Sort Performance
65-
66-
Benchmarks scan, reduce, and sort over a configurable range of input sizes. Choose the primitive,
67-
datatype, and sort direction; results are plotted after each run. Note that sort overwrites its
68-
input, so repeated trials measure a partially-sorted array.
69-
70-
<a href="{{ "/examples/scan_sort_perf.html" | relative_url }}" class="doc-btn">Open Example</a>
71-
<a href="https://github.com/gridwise-webgpu/gridwise/blob/main/examples/scan_sort_perf.mjs" target="_blank" class="doc-btn">Source</a>
72-
73-
### Reduce Performance
74-
75-
Benchmarks the reduce primitive over a configurable range of input sizes. Explains the
76-
warmup-then-trials timing strategy with inline code excerpts showing how to call
77-
`getTimingResult` after execution.
78-
79-
<a href="{{ "/examples/reduce_perf.html" | relative_url }}" class="doc-btn">Open Example</a>
80-
<a href="https://github.com/gridwise-webgpu/gridwise/blob/main/examples/reduce_perf.mjs" target="_blank" class="doc-btn">Source</a>
81-
8257
## Regression Testing
8358

8459
### Gridwise Regression Tests

docs/performance.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
layout: page
3+
title: Performance
4+
permalink: /performance/
5+
sidebar: performance
6+
---
7+
8+
Benchmarks for Gridwise primitives over a range of input sizes (logarithmically spaced),
9+
plotting throughput in GB/s versus input length. Both CPU and GPU timing are reported. See the
10+
[timing strategy documentation]({{ "/timing-strategy/" | relative_url }}) for how
11+
primitives are timed and how to interpret results.
12+
13+
## Scan and Sort Performance
14+
15+
Benchmarks scan, reduce, and sort over a configurable range of input sizes. Choose the primitive,
16+
datatype, and sort direction; results are plotted after each run. Note that sort overwrites its
17+
input, so repeated trials measure a partially-sorted array.
18+
19+
<a href="{{ "/examples/scan_sort_perf.html" | relative_url }}" class="doc-btn">Open Example</a>
20+
<a href="https://github.com/gridwise-webgpu/gridwise/blob/main/examples/scan_sort_perf.mjs" target="_blank" class="doc-btn">Source</a>
21+
22+
## Reduce Performance
23+
24+
Benchmarks the reduce primitive over a configurable range of input sizes. Explains the
25+
warmup-then-trials timing strategy with inline code excerpts showing how to call
26+
`getTimingResult` after execution.
27+
28+
<a href="{{ "/examples/reduce_perf.html" | relative_url }}" class="doc-btn">Open Example</a>
29+
<a href="https://github.com/gridwise-webgpu/gridwise/blob/main/examples/reduce_perf.mjs" target="_blank" class="doc-btn">Source</a>
30+
31+
---

examples/reduce_perf.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" />
88
</head>
99
<body>
10-
<a href="/gridwise/examples/" class="back-link">← Back to Examples</a>
10+
<a href="/gridwise/performance/" class="back-link">← Back to Performance</a>
1111
<h1>Reduce Performance</h1>
1212
<p>
1313
This example is a self-contained use of the <code>reduce</code>

examples/scan_sort_perf.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" />
88
</head>
99
<body>
10-
<a href="/gridwise/examples/" class="back-link">← Back to Examples</a>
10+
<a href="/gridwise/performance/" class="back-link">← Back to Performance</a>
1111
<h1>Scan / Sort Performance</h1>
1212
<p>
1313
This example is a self-contained use of the <code>scan</code> and

0 commit comments

Comments
 (0)