-
Notifications
You must be signed in to change notification settings - Fork 48
u384 MLIR function #1353
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
Closed
u384 MLIR function #1353
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmark results Main vs HEAD.Base
Head
Base
Head
Base
Head
Base
Head
Base
Head
Base
Head
|
Benchmarking resultsBenchmark for program
|
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
10.574 ± 0.082 | 10.501 | 10.784 | 4.24 ± 0.07 |
cairo-native (embedded AOT) |
2.497 ± 0.033 | 2.437 | 2.548 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2.544 ± 0.040 | 2.506 | 2.641 | 1.02 ± 0.02 |
Benchmark for program dict_snapshot
Open benchmarks
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
528.3 ± 3.4 | 524.1 | 535.7 | 1.00 |
cairo-native (embedded AOT) |
2110.0 ± 18.7 | 2077.4 | 2138.3 | 3.99 ± 0.04 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2258.9 ± 31.4 | 2222.4 | 2321.2 | 4.28 ± 0.07 |
Benchmark for program factorial_2M
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
4.621 ± 0.014 | 4.609 | 4.652 | 1.82 ± 0.01 |
cairo-native (embedded AOT) |
2.539 ± 0.014 | 2.518 | 2.562 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2.617 ± 0.048 | 2.546 | 2.707 | 1.03 ± 0.02 |
Benchmark for program fib_2M
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
4.559 ± 0.016 | 4.529 | 4.586 | 2.21 ± 0.03 |
cairo-native (embedded AOT) |
2.065 ± 0.027 | 2.028 | 2.115 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2.145 ± 0.029 | 2.113 | 2.206 | 1.04 ± 0.02 |
Benchmark for program linear_search
Open benchmarks
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
575.5 ± 5.6 | 566.1 | 584.3 | 1.00 |
cairo-native (embedded AOT) |
2167.7 ± 12.9 | 2149.8 | 2193.4 | 3.77 ± 0.04 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2319.8 ± 14.5 | 2297.3 | 2342.7 | 4.03 ± 0.05 |
Benchmark for program logistic_map
Open benchmarks
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
373.6 ± 2.9 | 369.7 | 378.3 | 1.00 |
cairo-native (embedded AOT) |
2246.4 ± 23.5 | 2214.6 | 2292.9 | 6.01 ± 0.08 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2469.7 ± 29.6 | 2417.6 | 2504.7 | 6.61 ± 0.09 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1353 +/- ##
==========================================
+ Coverage 76.22% 76.26% +0.04%
==========================================
Files 111 111
Lines 26520 26569 +49
==========================================
+ Hits 20214 20264 +50
+ Misses 6306 6305 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Closing this PR since it showed no improvement in the compilation times of the circuit related contracts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The function
u384_integer_to_struct()
was building MLIR code each time it was being called. In an effort to reduce compilation times, we wanted to see if by reducing the MLIR generated we could achieve this. This PR introduces an MLIR function that is only declared once so its code is not generated multiple times each time it is needed.Benchmarks
Main column contains the compilation times of the main branch (ref -> which includes the optimization done in #1348) and the Branch column contains the compilation times of this branhc (also includes the optimization done in #1348). These were ran on a MacBook Air M1 with 16 GB and opt level 2.
0x1b5fbe104c033025dbb7fb37011781cc9344e881b4828cdaa023a80fecafde4
0x3100defca27214e5f78f25e48a5b05e45899c6834cb4d34f48384c18e14dff7
0x79666cdb4fc3cbcafbd74f4ea4e2855bf455c5a7c70915f5679325c54032771
0xa40ecaa08eaef629d433b15f6b017461df8bea9b4e7299eb8ba3632e32b5a5
0x4ffeed293927cd56686a9038a10026a2d3b9602f789d1f163c1c4ac9a822a82
0x2269858a40ea0535cb373b0c981c91b907466edf6d65bcaf669760bbee0ae4d
0x5ff378cb2f16804539ecb92e84f273aafbab57d450530e9fe8e87771705a673
0x4edde37ca59d9dff8f4ac8945b1c4860b606abd61d74727904ad7494fccdfa9
Checklist