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 --no-default-features library-only builds. #984

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

azteca1998
Copy link
Collaborator

A few issues were preventing minimal builds from succeeding:

  • Some binary-only libraries had crept onto the library.
  • We were missing some conditional compilation flags.

All those issues have been fixed.

Checklist

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

@azteca1998 azteca1998 linked an issue Dec 20, 2024 that may be closed by this pull request
@azteca1998 azteca1998 marked this pull request as ready for review December 20, 2024 15:40
Copy link

Benchmark results Main vs HEAD.

Command Mean [s] Min [s] Max [s] Relative
base dict_insert.cairo (JIT) 4.024 ± 0.094 3.900 4.127 1.00
base dict_insert.cairo (AOT) 4.096 ± 0.032 4.060 4.156 1.02 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head dict_insert.cairo (JIT) 3.916 ± 0.027 3.876 3.962 1.00
head dict_insert.cairo (AOT) 4.101 ± 0.024 4.077 4.159 1.05 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base dict_snapshot.cairo (JIT) 4.066 ± 0.026 4.032 4.109 1.00
base dict_snapshot.cairo (AOT) 4.190 ± 0.027 4.160 4.232 1.03 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head dict_snapshot.cairo (JIT) 4.122 ± 0.039 4.076 4.199 1.00
head dict_snapshot.cairo (AOT) 4.255 ± 0.035 4.214 4.320 1.03 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base factorial_2M.cairo (JIT) 4.059 ± 0.016 4.031 4.084 1.00
base factorial_2M.cairo (AOT) 4.273 ± 0.029 4.226 4.319 1.05 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head factorial_2M.cairo (JIT) 4.126 ± 0.024 4.093 4.152 1.00
head factorial_2M.cairo (AOT) 4.355 ± 0.022 4.325 4.401 1.06 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base fib_2M.cairo (JIT) 3.610 ± 0.018 3.584 3.632 1.00
base fib_2M.cairo (AOT) 3.801 ± 0.012 3.786 3.823 1.05 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head fib_2M.cairo (JIT) 3.672 ± 0.023 3.644 3.701 1.00
head fib_2M.cairo (AOT) 3.898 ± 0.033 3.845 3.941 1.06 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base linear_search.cairo (JIT) 3.819 ± 0.027 3.785 3.878 1.00
base linear_search.cairo (AOT) 3.928 ± 0.019 3.896 3.953 1.03 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head linear_search.cairo (JIT) 3.894 ± 0.025 3.850 3.925 1.00
head linear_search.cairo (AOT) 4.025 ± 0.033 3.975 4.086 1.03 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base logistic_map.cairo (JIT) 3.918 ± 0.018 3.883 3.937 1.00
base logistic_map.cairo (AOT) 4.001 ± 0.019 3.970 4.040 1.02 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
:--- ---: ---: ---: ---:
head logistic_map.cairo (JIT) 3.986 ± 0.035 3.943 4.052 1.00
head logistic_map.cairo (AOT) 4.108 ± 0.039 4.033 4.161 1.03 ± 0.01

Copy link

Benchmarking results

Benchmark for program dict_insert

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 20.538 ± 0.144 20.377 20.876 100.84 ± 2.14
cairo-native (embedded AOT) 3.932 ± 0.019 3.913 3.981 19.30 ± 0.40
cairo-native (embedded JIT using LLVM's ORC Engine) 3.773 ± 0.012 3.752 3.789 18.53 ± 0.38
cairo-native (standalone AOT with -march=native) 0.204 ± 0.004 0.199 0.216 1.00

Benchmark for program dict_snapshot

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.636 ± 0.013 5.609 5.653 17.82 ± 0.12
cairo-native (embedded AOT) 4.104 ± 0.018 4.079 4.138 12.98 ± 0.10
cairo-native (embedded JIT using LLVM's ORC Engine) 3.963 ± 0.014 3.941 3.981 12.53 ± 0.09
cairo-native (standalone AOT with -march=native) 0.316 ± 0.002 0.313 0.320 1.00

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 14.018 ± 0.074 13.917 14.140 10.39 ± 0.06
cairo-native (embedded AOT) 4.353 ± 0.093 4.274 4.600 3.23 ± 0.07
cairo-native (embedded JIT using LLVM's ORC Engine) 4.098 ± 0.079 4.017 4.279 3.04 ± 0.06
cairo-native (standalone AOT with -march=native) 1.349 ± 0.001 1.346 1.351 1.00

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 14.441 ± 0.091 14.294 14.589 185.47 ± 6.03
cairo-native (embedded AOT) 3.727 ± 0.033 3.685 3.794 47.86 ± 1.59
cairo-native (embedded JIT using LLVM's ORC Engine) 3.499 ± 0.013 3.479 3.524 44.94 ± 1.44
cairo-native (standalone AOT with -march=native) 0.078 ± 0.002 0.077 0.093 1.00

Benchmark for program linear_search

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.634 ± 0.023 5.611 5.687 2846.21 ± 60.74
cairo-native (embedded AOT) 3.853 ± 0.024 3.816 3.884 1946.27 ± 42.48
cairo-native (embedded JIT using LLVM's ORC Engine) 3.764 ± 0.026 3.720 3.800 1901.54 ± 41.87
cairo-native (standalone AOT with -march=native) 0.002 ± 0.000 0.002 0.002 1.00

Benchmark for program logistic_map

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.523 ± 0.023 5.497 5.562 22.74 ± 0.14
cairo-native (embedded AOT) 3.887 ± 0.015 3.871 3.924 16.00 ± 0.10
cairo-native (embedded JIT using LLVM's ORC Engine) 3.809 ± 0.014 3.790 3.836 15.69 ± 0.09
cairo-native (standalone AOT with -march=native) 0.243 ± 0.001 0.242 0.246 1.00

@azteca1998 azteca1998 added this pull request to the merge queue Dec 20, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.75%. Comparing base (f53c947) to head (8817138).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #984      +/-   ##
==========================================
- Coverage   80.76%   80.75%   -0.01%     
==========================================
  Files         107      107              
  Lines       29256    29256              
==========================================
- Hits        23628    23627       -1     
- Misses       5628     5629       +1     

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

Merged via the queue into main with commit 3249563 Dec 20, 2024
32 checks passed
@azteca1998 azteca1998 deleted the fix-no-default-features-build branch December 20, 2024 19:07
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.

Build fails when disabling default features
5 participants