Skip to content

Commit 0b5b308

Browse files
committed
Merge pull request gpujs#45 from gpujs/eugene-#25-demo
Tweaked playground default, for clearer visibility on the CPU / GPU c…
2 parents ce6bbca + 1c9ba99 commit 0b5b308

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

demo/playground.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,11 @@ <h3>Step 2) Program your kernel function</h3>
162162
<div class="container">
163163
<h3>Step 3) BENCH! CPU vs GPU</h3>
164164
<blockquote>
165-
Setup your sample size upper, lower bounds. Its increment size. Benchmark iterations
165+
Setup your sample size upper, lower bounds. Its increment size. Benchmark iterations. And bench it!<br/><br/>
166+
Generally speaking however, these are common learning notes.<br/><br/>
167+
- Due to the non-negligable overhead of running the webgl engine, small data sample sizes (such as <= 250) tends to be slower on GPU. Cut off point varies between kernel and machines<br/>
166168
<br/>
167-
And bench it!
169+
- There is a small data transfer cost, to move from JS to GPU, paid by the CPU. Which is propotional to the data size. As such extremely simple kernel (such as A+B) will always be slower in GPU<br/>
168170
</blockquote>
169171
</div>
170172
<div class="container">
@@ -176,7 +178,7 @@ <h3>Step 3) BENCH! CPU vs GPU</h3>
176178
<span class="glyphicon glyphicon-minus"></span>
177179
</button>
178180
</span>
179-
<input type="text" name="bench_lower" id="bench_lower" class="form-control input-number" value="250" min="0" max="4294967295">
181+
<input type="text" name="bench_lower" id="bench_lower" class="form-control input-number" value="50" min="0" max="4294967295">
180182
<span class="input-group-btn">
181183
<button type="button" class="btn btn-default btn-number" data-type="plus" data-field="bench_lower">
182184
<span class="glyphicon glyphicon-plus"></span>
@@ -192,7 +194,7 @@ <h3>Step 3) BENCH! CPU vs GPU</h3>
192194
<span class="glyphicon glyphicon-minus"></span>
193195
</button>
194196
</span>
195-
<input type="text" name="bench_upper" id="bench_upper" class="form-control input-number" value="2500" min="0" max="4294967295">
197+
<input type="text" name="bench_upper" id="bench_upper" class="form-control input-number" value="1500" min="0" max="4294967295">
196198
<span class="input-group-btn">
197199
<button type="button" class="btn btn-default btn-number" data-type="plus" data-field="bench_upper">
198200
<span class="glyphicon glyphicon-plus"></span>

0 commit comments

Comments
 (0)