Skip to content

collecting pa also when proof_mode=false #2055

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

Conversation

Stavbe
Copy link
Collaborator

@Stavbe Stavbe commented Apr 6, 2025

Public memory offsets are written to each segment when calling finalize().
This currently happens only in proof mode.
We changed the call to finalize to be called when trace is enabled (which is set when the flag prover input info is some).


This change is Reviewable

@Stavbe Stavbe self-assigned this Apr 6, 2025
@Stavbe Stavbe requested a review from yuvalsw April 6, 2025 15:35
@Stavbe Stavbe marked this pull request as ready for review April 6, 2025 15:43
Copy link

github-actions bot commented Apr 6, 2025

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.137 ± 0.006 2.128 2.148 1.00
head big_factorial 2.157 ± 0.033 2.132 2.217 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.074 ± 0.007 2.061 2.084 1.00 ± 0.01
head big_fibonacci 2.074 ± 0.014 2.061 2.111 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 7.974 ± 0.092 7.865 8.162 1.00
head blake2s_integration_benchmark 7.992 ± 0.258 7.811 8.613 1.00 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.187 ± 0.005 2.182 2.200 1.00
head compare_arrays_200000 2.188 ± 0.015 2.176 2.227 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.455 ± 0.006 1.448 1.466 1.03 ± 0.01
head dict_integration_benchmark 1.416 ± 0.006 1.411 1.431 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.232 ± 0.003 1.227 1.238 1.00 ± 0.01
head field_arithmetic_get_square_benchmark 1.228 ± 0.009 1.220 1.252 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 7.940 ± 0.057 7.867 8.061 1.00
head integration_builtins 7.976 ± 0.106 7.878 8.218 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 8.277 ± 0.046 8.233 8.377 1.00 ± 0.01
head keccak_integration_benchmark 8.264 ± 0.062 8.187 8.410 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.186 ± 0.006 2.179 2.196 1.00
head linear_search 2.191 ± 0.007 2.178 2.206 1.00 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.548 ± 0.012 1.535 1.574 1.01 ± 0.01
head math_cmp_and_pow_integration_benchmark 1.536 ± 0.006 1.528 1.545 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.475 ± 0.005 1.470 1.487 1.00 ± 0.01
head math_integration_benchmark 1.468 ± 0.007 1.457 1.479 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.232 ± 0.008 1.222 1.242 1.01 ± 0.01
head memory_integration_benchmark 1.224 ± 0.006 1.217 1.233 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.616 ± 0.028 1.590 1.685 1.01 ± 0.02
head operations_with_data_structures_benchmarks 1.600 ± 0.009 1.583 1.613 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 542.4 ± 2.6 539.7 548.9 1.00
head pedersen 544.7 ± 4.1 541.8 555.8 1.00 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 671.0 ± 2.5 667.8 676.5 1.01 ± 0.01
head poseidon_integration_benchmark 664.3 ± 5.6 658.8 678.8 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.895 ± 0.011 1.880 1.920 1.00 ± 0.01
head secp_integration_benchmark 1.891 ± 0.005 1.882 1.900 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 693.1 ± 3.9 688.7 700.9 1.08 ± 0.01
head set_integration_benchmark 641.0 ± 1.5 638.5 643.3 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.407 ± 0.066 4.334 4.570 1.02 ± 0.02
head uint256_integration_benchmark 4.328 ± 0.027 4.308 4.401 1.00

@Stavbe Stavbe force-pushed the stav/add_prover-input_info_flag branch from f98dae1 to d729b9f Compare April 7, 2025 07:41
@Stavbe Stavbe force-pushed the stav/collect_public_addresses_with_no_proof_mode branch from fb276ae to 360e38f Compare April 7, 2025 07:45
Copy link
Collaborator

@DavidLevitGurevich DavidLevitGurevich left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @yuvalsw)

@Stavbe Stavbe changed the base branch from stav/add_prover-input_info_flag to starkware-development April 7, 2025 08:17
Copy link
Collaborator

@yuvalsw yuvalsw left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 1 of 3 files reviewed, all discussions resolved (waiting on @Stavbe)

@Stavbe Stavbe force-pushed the stav/collect_public_addresses_with_no_proof_mode branch from 360e38f to 1e4da82 Compare April 7, 2025 08:39
Copy link

github-actions bot commented Apr 7, 2025

**Hyper Thereading Benchmark results**




hyperfine -r 2 -n "hyper_threading_main threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_main' -n "hyper_threading_pr threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 1
  Time (mean ± σ):     26.265 s ±  0.002 s    [User: 25.539 s, System: 0.726 s]
  Range (min … max):   26.264 s … 26.267 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     26.605 s ±  0.024 s    [User: 25.779 s, System: 0.825 s]
  Range (min … max):   26.588 s … 26.622 s    2 runs
 
Summary
  hyper_threading_main threads: 1 ran
    1.01 ± 0.00 times faster than hyper_threading_pr threads: 1




hyperfine -r 2 -n "hyper_threading_main threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_main' -n "hyper_threading_pr threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 2
  Time (mean ± σ):     14.624 s ±  0.007 s    [User: 25.616 s, System: 0.771 s]
  Range (min … max):   14.619 s … 14.629 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     14.812 s ±  0.004 s    [User: 25.862 s, System: 0.812 s]
  Range (min … max):   14.809 s … 14.815 s    2 runs
 
Summary
  hyper_threading_main threads: 2 ran
    1.01 ± 0.00 times faster than hyper_threading_pr threads: 2




hyperfine -r 2 -n "hyper_threading_main threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_main' -n "hyper_threading_pr threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 4
  Time (mean ± σ):     10.940 s ±  0.177 s    [User: 37.417 s, System: 0.898 s]
  Range (min … max):   10.815 s … 11.065 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     10.718 s ±  0.313 s    [User: 38.804 s, System: 0.984 s]
  Range (min … max):   10.497 s … 10.940 s    2 runs
 
Summary
  hyper_threading_pr threads: 4 ran
    1.02 ± 0.03 times faster than hyper_threading_main threads: 4




hyperfine -r 2 -n "hyper_threading_main threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_main' -n "hyper_threading_pr threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 6
  Time (mean ± σ):     10.452 s ±  0.090 s    [User: 37.681 s, System: 0.958 s]
  Range (min … max):   10.388 s … 10.516 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     10.770 s ±  0.250 s    [User: 39.062 s, System: 1.064 s]
  Range (min … max):   10.594 s … 10.947 s    2 runs
 
Summary
  hyper_threading_main threads: 6 ran
    1.03 ± 0.03 times faster than hyper_threading_pr threads: 6




hyperfine -r 2 -n "hyper_threading_main threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_main' -n "hyper_threading_pr threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 8
  Time (mean ± σ):     10.427 s ±  0.012 s    [User: 38.264 s, System: 0.963 s]
  Range (min … max):   10.418 s … 10.435 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     10.652 s ±  0.252 s    [User: 39.083 s, System: 1.057 s]
  Range (min … max):   10.474 s … 10.830 s    2 runs
 
Summary
  hyper_threading_main threads: 8 ran
    1.02 ± 0.02 times faster than hyper_threading_pr threads: 8




hyperfine -r 2 -n "hyper_threading_main threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_main' -n "hyper_threading_pr threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 16
  Time (mean ± σ):     10.417 s ±  0.237 s    [User: 38.570 s, System: 1.075 s]
  Range (min … max):   10.249 s … 10.584 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     10.488 s ±  0.089 s    [User: 39.705 s, System: 1.157 s]
  Range (min … max):   10.426 s … 10.551 s    2 runs
 
Summary
  hyper_threading_main threads: 16 ran
    1.01 ± 0.02 times faster than hyper_threading_pr threads: 16


@Stavbe Stavbe force-pushed the stav/collect_public_addresses_with_no_proof_mode branch from 1e4da82 to 41fa780 Compare April 7, 2025 09:23
@Stavbe Stavbe closed this Apr 14, 2025
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.

3 participants