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

Add benchmarks for SIMD merkle #610

Merged
merged 1 commit into from
May 19, 2024

Conversation

andrewmilson
Copy link
Contributor

@andrewmilson andrewmilson commented May 3, 2024

This change is Reviewable

@andrewmilson andrewmilson force-pushed the 05-02-Add_benchmarks_for_SIMD_merkle branch from 7bfe80c to a29f2e4 Compare May 3, 2024 01:20
@codecov-commenter
Copy link

codecov-commenter commented May 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.41%. Comparing base (70e1b37) to head (87eafcb).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #610   +/-   ##
=======================================
  Coverage   93.41%   93.41%           
=======================================
  Files          84       84           
  Lines       11909    11909           
  Branches    11909    11909           
=======================================
  Hits        11125    11125           
  Misses        702      702           
  Partials       82       82           

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

@andrewmilson andrewmilson force-pushed the 05-02-Add_benchmarks_for_SIMD_merkle branch from 23f39d6 to f92868b Compare May 11, 2024 02:43
@andrewmilson andrewmilson force-pushed the 05-02-Add_benchmarks_for_SIMD_fft branch from 7e001e1 to 8d0653c Compare May 15, 2024 04:34
@andrewmilson andrewmilson force-pushed the 05-02-Add_benchmarks_for_SIMD_merkle branch from f92868b to 8028b66 Compare May 15, 2024 04:34
@andrewmilson andrewmilson force-pushed the 05-02-Add_benchmarks_for_SIMD_fft branch from 8d0653c to 27851cb Compare May 15, 2024 19:38
@andrewmilson andrewmilson force-pushed the 05-02-Add_benchmarks_for_SIMD_merkle branch from 8028b66 to 99d646a Compare May 15, 2024 19:38
@andrewmilson andrewmilson force-pushed the 05-02-Add_benchmarks_for_SIMD_fft branch from 27851cb to df625de Compare May 16, 2024 03:56
@andrewmilson andrewmilson force-pushed the 05-02-Add_benchmarks_for_SIMD_merkle branch from 99d646a to 9f9d708 Compare May 16, 2024 03:56
Copy link
Contributor

@spapinistarkware spapinistarkware left a comment

Choose a reason for hiding this comment

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

simd merkle benchmarks seems slower than avx.

Reviewable status: 0 of 1 files reviewed, all discussions resolved

@andrewmilson andrewmilson force-pushed the 05-02-Add_benchmarks_for_SIMD_merkle branch from 9f9d708 to f4e45d8 Compare May 16, 2024 14:42
@andrewmilson andrewmilson changed the base branch from 05-02-Add_benchmarks_for_SIMD_fft to dev May 16, 2024 14:42
@andrewmilson andrewmilson force-pushed the 05-02-Add_benchmarks_for_SIMD_merkle branch 2 times, most recently from a3208d3 to aaa48c8 Compare May 16, 2024 16:47
Copy link
Contributor Author

@andrewmilson andrewmilson left a comment

Choose a reason for hiding this comment

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

Fixed
Screenshot 2024-05-16 at 12.48.20 pm.png

Reviewable status: 0 of 2 files reviewed, all discussions resolved

Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a comment

Choose a reason for hiding this comment

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

Nice

Reviewed 1 of 1 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @andrewmilson)


crates/prover/benches/merkle.rs line 22 at r2 (raw file):

    let mut group = c.benchmark_group("merkle throughput");
    group.throughput(Throughput::Elements(1 << (LOG_N_COLS + LOG_N_ROWS)));
    group.throughput(Throughput::Bytes(4 << (LOG_N_COLS + LOG_N_ROWS)));

I think that we have n_bytes_per_felt const.

Code quote:

4

crates/prover/src/core/backend/simd/blake2s.rs line 114 at r2 (raw file):

// `inline(always)` can cause code parsing errors for wasm: "locals exceed maximum".
#[cfg_attr(not(target_arch = "wasm32"), inline(always))]

Can you separate this change from the benchmark pr?

Code quote:

// `inline(always)` can cause code parsing errors for wasm: "locals exceed maximum".
#[cfg_attr(not(target_arch = "wasm32"), inline(always))]

@andrewmilson andrewmilson force-pushed the 05-02-Add_benchmarks_for_SIMD_merkle branch from aaa48c8 to 8da054d Compare May 19, 2024 13:44
Copy link
Contributor Author

@andrewmilson andrewmilson left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @shaharsamocha7)


crates/prover/src/core/backend/simd/blake2s.rs line 114 at r2 (raw file):

Previously, shaharsamocha7 wrote…

Can you separate this change from the benchmark pr?

https://reviewable.io/reviews/starkware-libs/stwo/635

@andrewmilson andrewmilson force-pushed the 05-02-Add_benchmarks_for_SIMD_merkle branch from 8da054d to 87eafcb Compare May 19, 2024 14:17
@andrewmilson andrewmilson merged commit af852c0 into dev May 19, 2024
11 of 12 checks passed
@andrewmilson andrewmilson deleted the 05-02-Add_benchmarks_for_SIMD_merkle branch May 19, 2024 14:24
This was referenced Aug 13, 2024
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.

4 participants