Skip to content

Eval network until the end for fairness#76

Merged
blegat merged 2 commits into
mainfrom
bl/hand_eval
May 28, 2026
Merged

Eval network until the end for fairness#76
blegat merged 2 commits into
mainfrom
bl/hand_eval

Conversation

@blegat
Copy link
Copy Markdown
Owner

@blegat blegat commented May 28, 2026

The others were evaluating the network completely, not just the gradient so it's fairer to do it in hand-cuda too.
Still the fastest though:

julia> HandCuda.neural(T, h, d, n; prealloc=false, gpu=false)
BenchmarkTools.Trial: 316 samples with 1 evaluation per sample.
 Range (min … max):   8.493 ms … 267.355 ms  ┊ GC (min … max):  0.00% … 96.10%
 Time  (median):      8.758 ms               ┊ GC (median):     0.00%
 Time  (mean ± σ):   15.838 ms ±  37.459 ms  ┊ GC (mean ± σ):  41.13% ± 18.44%

  █▂                                                            
  ██▄▁▁▁▄▆▅▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▆ ▅
  8.49 ms       Histogram: log(frequency) by time       261 ms <

 Memory estimate: 14.11 MiB, allocs estimate: 25.

julia> HandCuda.neural(T, h, d, n; prealloc=true, gpu=false)
BenchmarkTools.Trial: 424 samples with 1 evaluation per sample.
 Range (min … max):   4.810 ms … 284.633 ms  ┊ GC (min … max):  0.00% … 96.84%
 Time  (median):      8.260 ms               ┊ GC (median):     0.00%
 Time  (mean ± σ):   12.432 ms ±  32.054 ms  ┊ GC (mean ± σ):  35.17% ± 15.16%

  █▄                                                            
  ██▁▁▁▁▁▆▅▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▄▄ ▆
  4.81 ms       Histogram: log(frequency) by time       274 ms <

 Memory estimate: 8.55 MiB, allocs estimate: 19.

julia> HandCuda.neural(T, h, d, n; prealloc=false, gpu=true)
BenchmarkTools.Trial: 10000 samples with 1 evaluation per sample.
 Range (min … max):  215.534 μs … 286.947 ms  ┊ GC (min … max):  0.00% … 96.67%
 Time  (median):     225.652 μs               ┊ GC (median):     0.00%
 Time  (mean ± σ):   293.689 μs ±   2.987 ms  ┊ GC (mean ± σ):  14.14% ±  1.92%

       ▂█▅▁                                                      
  ▁▁▁▃▆████▇▅▄▄▃▂▂▃▃▂▂▂▂▂▂▁▂▂▂▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▂
  216 μs           Histogram: frequency by time          291 μs <

 Memory estimate: 16.48 KiB, allocs estimate: 526.

julia> HandCuda.neural(T, h, d, n; prealloc=true, gpu=true)
BenchmarkTools.Trial: 10000 samples with 1 evaluation per sample.
 Range (min … max):  186.499 μs …  21.708 ms  ┊ GC (min … max): 0.00% … 28.60%
 Time  (median):     195.751 μs               ┊ GC (median):    0.00%
 Time  (mean ± σ):   222.872 μs ± 664.189 μs  ┊ GC (mean ± σ):  3.47% ±  1.16%

        ▂▄▆█▂                                                    
  ▁▂▂▃▄▇█████▆▅▅▃▃▃▃▃▂▂▂▂▂▂▂▃▃▂▃▃▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▂
  186 μs           Histogram: frequency by time          244 μs <

 Memory estimate: 16.38 KiB, allocs estimate: 488.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.23%. Comparing base (7b8963c) to head (5504624).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #76   +/-   ##
=======================================
  Coverage   92.23%   92.23%           
=======================================
  Files          25       25           
  Lines        3219     3219           
=======================================
  Hits         2969     2969           
  Misses        250      250           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@blegat blegat merged commit 7d58f8c into main May 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant