You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: demo/playground.html
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -162,9 +162,11 @@ <h3>Step 2) Program your kernel function</h3>
162
162
<divclass="container">
163
163
<h3>Step 3) BENCH! CPU vs GPU</h3>
164
164
<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/>
166
168
<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/>
168
170
</blockquote>
169
171
</div>
170
172
<divclass="container">
@@ -176,7 +178,7 @@ <h3>Step 3) BENCH! CPU vs GPU</h3>
0 commit comments