Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

benchncnn: support running CPU and GPU tests in a single pass #5513

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Jun 13, 2024

  1. benchncnn: add a Benchmark context

    No functional changes for now. Prepare for the next changeset.
    quink-black committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    c15ab15 View commit details
    Browse the repository at this point in the history
  2. benchncnn: support running CPU and GPU tests in a single pass

    For example: benchncnn 4 8 2 -1,0 0
    
         squeezenet cpu min =    5.39  max =    5.60  avg =    5.53
         squeezenet gpu min =    1.59  max =    2.40  avg =    1.94
    squeezenet_int8 cpu min =    3.52  max =    3.53  avg =    3.52
    squeezenet_int8 gpu min =    3.54  max =    3.57  avg =    3.56
    quink-black committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    f117075 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2024

  1. benchncnn: measure speedup and cpu usage ratio

    For example, on macOS:
         squeezenet cpu min =    5.14  max =    5.23  avg =    5.19  user =    5.18  sys =    0.00
         squeezenet gpu min =    1.30  max =    1.35  avg =    1.33  user =    0.13  sys =    0.05  speed_ratio =   3.90x  cpu_ratio =   3.48%
    
    Vulkan boost the speed and reduce cpu usage.
    
    On Android:
         squeezenet cpu min =    4.88  max =    5.06  avg =    4.98  user =   20.88  sys =    3.93
         squeezenet gpu min =   17.44  max =   19.18  avg =   18.47  user =    3.90  sys =    1.26  speed_ratio =   0.27x  cpu_ratio =  20.77%
    
    Vulkan doesn't boost the speed but reduce cpu usage, which can be useful too.
    quink-black committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    0e419ff View commit details
    Browse the repository at this point in the history
  2. apply code-format changes

    quink-black authored and github-actions[bot] committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    5726d69 View commit details
    Browse the repository at this point in the history