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

Fix possible segfault when checking runtime's version #1032

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

FrancoGiachetta
Copy link
Contributor

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.

Copy link

github-actions bot commented Jan 8, 2025

Benchmark results Main vs HEAD.

Command Mean [s] Min [s] Max [s] Relative
base dict_insert.cairo (JIT) 3.909 ± 0.059 3.838 3.990 1.00
base dict_insert.cairo (AOT) 4.084 ± 0.051 4.023 4.194 1.04 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head dict_insert.cairo (JIT) 4.000 ± 0.036 3.958 4.071 1.00
head dict_insert.cairo (AOT) 4.177 ± 0.031 4.131 4.231 1.04 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base dict_snapshot.cairo (JIT) 4.145 ± 0.055 4.062 4.242 1.00
base dict_snapshot.cairo (AOT) 4.208 ± 0.029 4.150 4.243 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head dict_snapshot.cairo (JIT) 4.158 ± 0.027 4.114 4.209 1.00
head dict_snapshot.cairo (AOT) 4.331 ± 0.033 4.300 4.419 1.04 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base factorial_2M.cairo (JIT) 4.232 ± 0.045 4.145 4.293 1.00
base factorial_2M.cairo (AOT) 4.379 ± 0.031 4.323 4.428 1.03 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head factorial_2M.cairo (JIT) 4.185 ± 0.030 4.147 4.250 1.00
head factorial_2M.cairo (AOT) 4.398 ± 0.031 4.361 4.450 1.05 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base fib_2M.cairo (JIT) 3.688 ± 0.042 3.613 3.734 1.00
base fib_2M.cairo (AOT) 3.888 ± 0.031 3.846 3.941 1.05 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head fib_2M.cairo (JIT) 3.734 ± 0.031 3.678 3.796 1.00
head fib_2M.cairo (AOT) 3.966 ± 0.046 3.915 4.055 1.06 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base linear_search.cairo (JIT) 3.871 ± 0.037 3.829 3.937 1.00
base linear_search.cairo (AOT) 3.975 ± 0.028 3.950 4.030 1.03 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head linear_search.cairo (JIT) 3.904 ± 0.024 3.864 3.952 1.00
head linear_search.cairo (AOT) 4.016 ± 0.021 3.981 4.049 1.03 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base logistic_map.cairo (JIT) 3.949 ± 0.043 3.889 4.011 1.00
base logistic_map.cairo (AOT) 4.034 ± 0.059 3.957 4.141 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head logistic_map.cairo (JIT) 4.011 ± 0.028 3.949 4.041 1.00
head logistic_map.cairo (AOT) 4.107 ± 0.026 4.073 4.148 1.02 ± 0.01

Copy link

github-actions bot commented Jan 8, 2025

Benchmarking results

Benchmark for program dict_insert

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 21.323 ± 0.100 21.190 21.545 95.42 ± 1.87
cairo-native (embedded AOT) 4.241 ± 0.039 4.185 4.311 18.98 ± 0.40
cairo-native (embedded JIT using LLVM's ORC Engine) 3.940 ± 0.061 3.866 4.070 17.63 ± 0.43
cairo-native (standalone AOT with -march=native) 0.223 ± 0.004 0.217 0.232 1.00

Benchmark for program dict_snapshot

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.885 ± 0.054 5.826 5.966 18.38 ± 0.18
cairo-native (embedded AOT) 4.408 ± 0.039 4.348 4.487 13.77 ± 0.13
cairo-native (embedded JIT using LLVM's ORC Engine) 4.154 ± 0.042 4.095 4.213 12.97 ± 0.14
cairo-native (standalone AOT with -march=native) 0.320 ± 0.001 0.319 0.323 1.00

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 15.269 ± 0.103 15.076 15.449 11.25 ± 0.08
cairo-native (embedded AOT) 4.408 ± 0.059 4.332 4.522 3.25 ± 0.04
cairo-native (embedded JIT using LLVM's ORC Engine) 4.144 ± 0.047 4.110 4.267 3.05 ± 0.03
cairo-native (standalone AOT with -march=native) 1.358 ± 0.002 1.356 1.363 1.00

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 15.085 ± 0.071 15.003 15.210 187.53 ± 1.08
cairo-native (embedded AOT) 3.937 ± 0.033 3.890 3.996 48.94 ± 0.44
cairo-native (embedded JIT using LLVM's ORC Engine) 3.727 ± 0.038 3.685 3.801 46.33 ± 0.49
cairo-native (standalone AOT with -march=native) 0.080 ± 0.000 0.080 0.081 1.00

Benchmark for program linear_search

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.904 ± 0.046 5.826 5.952 2861.30 ± 94.84
cairo-native (embedded AOT) 4.209 ± 0.065 4.099 4.282 2039.79 ± 72.84
cairo-native (embedded JIT using LLVM's ORC Engine) 4.143 ± 0.049 4.050 4.212 2007.74 ± 68.93
cairo-native (standalone AOT with -march=native) 0.002 ± 0.000 0.002 0.003 1.00

Benchmark for program logistic_map

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.816 ± 0.069 5.713 5.954 23.94 ± 0.29
cairo-native (embedded AOT) 4.147 ± 0.034 4.104 4.212 17.07 ± 0.14
cairo-native (embedded JIT using LLVM's ORC Engine) 4.079 ± 0.043 4.021 4.140 16.79 ± 0.18
cairo-native (standalone AOT with -march=native) 0.243 ± 0.000 0.242 0.244 1.00

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.88%. Comparing base (a561062) to head (a2f029c).

Files with missing lines Patch % Lines
runtime/src/lib.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1032   +/-   ##
=======================================
  Coverage   80.88%   80.88%           
=======================================
  Files         107      107           
  Lines       29470    29470           
=======================================
  Hits        23836    23836           
  Misses       5634     5634           

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

@edg-l edg-l added this pull request to the merge queue Jan 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 8, 2025
@gabrielbosio gabrielbosio added this pull request to the merge queue Jan 8, 2025
Merged via the queue into main with commit 6a4efaf Jan 8, 2025
32 checks passed
@gabrielbosio gabrielbosio deleted the fix-version-segfault branch January 8, 2025 18:15
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.

5 participants