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

Improve CUDA performance #653

Merged
merged 2 commits into from
Jun 25, 2023
Merged

Improve CUDA performance #653

merged 2 commits into from
Jun 25, 2023

Conversation

flaub
Copy link
Member

@flaub flaub commented Jun 24, 2023

No description provided.

@flaub flaub requested review from jbruestle and mothran June 24, 2023 04:48
@flaub flaub self-assigned this Jun 24, 2023
@github-actions
Copy link

Benchmark for Linux-cuda c05f8ee

Click to hide benchmark
Test Base PR %
fib/100/execute 5.2±0.12ms 5.2±0.10ms 0.00%
fib/100/prove 1261.3±8.11ms 1062.5±3.27ms -15.76%
fib/100/total 1264.0±11.24ms 1066.4±6.42ms -15.63%
fib/1000/execute 5.7±0.10ms 5.7±0.13ms 0.00%
fib/1000/prove 1301.0±7.55ms 1098.0±7.15ms -15.60%
fib/1000/total 1302.8±9.03ms 1102.8±3.99ms -15.35%
fib/10000/execute 10.3±0.09ms 10.2±0.12ms -0.97%
fib/10000/prove 5.1±0.04s 4.1±0.05s -19.61%
fib/10000/total 5.2±0.04s 4.1±0.04s -21.15%

Benchmark for Linux-default

    <details open>
      <summary>Click to hide benchmark</summary>
      Benchmarks have changed between the two branches, unable to diff.
    </details>

Benchmark for macOS-default c05f8ee

Click to hide benchmark
Test Base PR %
fib/100/execute 2.8±0.19ms 2.7±0.13ms -3.57%
fib/100/prove 3.6±0.05s 3.6±0.04s 0.00%
fib/100/total 3.6±0.04s 3.6±0.03s 0.00%
fib/1000/execute 2.9±0.06ms 2.9±0.08ms 0.00%
fib/1000/prove 3.6±0.04s 3.6±0.09s 0.00%
fib/1000/total 3.6±0.07s 3.6±0.02s 0.00%
fib/10000/execute 5.2±0.14ms 5.0±0.06ms -3.85%
fib/10000/prove 14.6±0.30s 14.6±0.12s 0.00%
fib/10000/total 14.7±0.32s 14.6±0.13s -0.68%

Benchmark for macOS-metal c05f8ee

Click to hide benchmark
Test Base PR %
fib/100/execute 2.8±0.07ms 2.8±0.05ms 0.00%
fib/100/prove 849.2±4.39ms 848.4±5.39ms -0.09%
fib/100/total 875.0±5.88ms 872.6±7.61ms -0.27%
fib/1000/execute 3.0±0.11ms 2.9±0.04ms -3.33%
fib/1000/prove 869.7±4.82ms 866.4±3.52ms -0.38%
fib/1000/total 898.0±4.98ms 896.8±7.91ms -0.13%
fib/10000/execute 5.1±0.07ms 5.0±0.15ms -1.96%
fib/10000/prove 3.4±0.01s 3.3±0.01s -2.94%
fib/10000/total 3.4±0.01s 3.3±0.01s -2.94%

Copy link
Contributor

@jbruestle jbruestle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good minus a the fixed constant and hidden dependence on another constant.

risc0/zkp/src/hal/cuda.rs Outdated Show resolved Hide resolved
@github-actions
Copy link

Benchmark for Linux-cuda db050b2

Click to hide benchmark
Test Base PR %
fib/100/execute 5.2±0.09ms 5.2±0.09ms 0.00%
fib/100/prove 1288.5±5.52ms 1103.4±3.48ms -14.37%
fib/100/total 1300.1±8.07ms 1101.0±3.32ms -15.31%
fib/1000/execute 5.7±0.11ms 5.7±0.12ms 0.00%
fib/1000/prove 1331.8±6.04ms 1146.9±5.59ms -13.88%
fib/1000/total 1318.3±7.91ms 1133.5±3.71ms -14.02%
fib/10000/execute 10.3±0.14ms 10.2±0.14ms -0.97%
fib/10000/prove 5.2±0.04s 4.3±0.04s -17.31%
fib/10000/total 5.2±0.05s 4.3±0.04s -17.31%

Benchmark for Linux-default

    <details open>
      <summary>Click to hide benchmark</summary>
      Benchmarks have changed between the two branches, unable to diff.
    </details>

Benchmark for macOS-default db050b2

Click to hide benchmark
Test Base PR %
fib/100/execute 2.7±0.13ms 2.7±0.10ms 0.00%
fib/100/prove 3.7±0.06s 3.7±0.03s 0.00%
fib/100/total 3.7±0.05s 3.7±0.04s 0.00%
fib/1000/execute 2.9±0.06ms 2.9±0.07ms 0.00%
fib/1000/prove 3.7±0.07s 3.7±0.05s 0.00%
fib/1000/total 3.7±0.05s 3.7±0.06s 0.00%
fib/10000/execute 5.2±0.12ms 5.1±0.11ms -1.92%
fib/10000/prove 15.3±0.12s 15.2±0.14s -0.65%
fib/10000/total 15.3±0.14s 15.2±0.13s -0.65%

Benchmark for macOS-metal

    <details open>
      <summary>Click to hide benchmark</summary>
      Benchmarks have changed between the two branches, unable to diff.
    </details>

@flaub flaub merged commit d79ab62 into main Jun 25, 2023
12 checks passed
@flaub flaub deleted the flaub/cuda branch June 25, 2023 20:49
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.

None yet

2 participants