-
Notifications
You must be signed in to change notification settings - Fork 46
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
[DNM] Trace Dump Feature #1077
Draft
JulianGCalderon
wants to merge
50
commits into
main
Choose a base branch
from
trace-dump-feature
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[DNM] Trace Dump Feature #1077
Conversation
This file contains 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
* Impl ClassHash and SegmentArena * Add trace dump support to compiler * Reset workflows * Update lock * Implement BoundedInt * Fix Enum trace dump * Make gas_metadata public * Update deps * Fix bug * Move deps to optional (trace dump featire)
* Add logs * Implement Felt252Dict trace dump * Implement nullabel for trace dump * Print type id * Remove print * add convertion for Sints * fix mispelled types * forgot to add feature * change Sints value to correspond to sierra-emu * Readd feature * Add is_infinity field to secp256 point struct (#828) * add is_infinity to secp point * clean * fix * use same deps as blockifier * fix * fix layout * fix test * remove some brittle asserts due to random initial data when adding and muling points at infinity * fix * remove unused dep * fixes, missed the value entry/output * Reset src * Fix warnings * Make library public * Use debug runtime for trace dump * fix storage's values truncations (#839) * fix storage's values truncations * change implementation for i8 i16 i32 i64 too * format * Add ptr check to felt dict entry * Add malloc tracing and fix more memory leaks. (#833) * Add memory tracing. * Partial memory fixes. * Fix arrays. * Simplify dictionaries. Fix false positive memory leak in dictionary drops. * Fix zero-sized allocation. Fix warnings. More mem tracing checks. * Fix mem tracing. * Fix memory leak in `print` libfunc. * Fix array slice libfunc. * Fix starknet memory leaks. * Fix keccak syscall. * Fix dict get double free bug. * Lots of memory fixes. * More fixes. * Fix CI. * Remove old TODOs. * Fix CI (again). * Remove TODOs. * Fix test. * Maybe fix * Maybe fix * Maybe fix * Dont panic when building circuit partial outputs * trace dump for Sha256StateHandler * Builtin costs rework (#837) * Update to 2.8.4, release docs, alpha This PR updates cairo to 2.8.4, adds some release docs and updates the version to alpha.3 to prepare for another release. * try fix * cleanup ci, remove panic in link * rename from jit to from ptr, etc * crates.io badge * progress * progress * fmt2 * progress * progress * fix * fix bench * use struct * Fix felt252 and enum deserialization bugs. (#844) * Fix felt252 and enum deserialization bugs. * Fix formatting. * Also fix the runtime. * Fix errors. * try to fix ci * remove unused deps --------- Co-authored-by: Edgar Luque <git@edgarluque.com> * Fix trace dump type conv * fix aot contract executor not passing builtinstats (#849) * Fix felt252 and enum deserialization bugs. * Fix formatting. * Also fix the runtime. * Fix errors. * try to fix ci * remove unused deps * fix aot contract executor not passing builtinstats --------- Co-authored-by: Esteve Soler Arderiu <esteve.soler@lambdaclass.com> Co-authored-by: Esteve Soler Arderiu <soler.arderiu@gmail.com> * Fix bug (#851) * Also fix felt bits in starknet syscall wrappers (#853) * Also fix felt bits in starknet syscall wrappers * style * missed * fix aot contract executor not passing builtinstats (#849) * Fix felt252 and enum deserialization bugs. * Fix formatting. * Also fix the runtime. * Fix errors. * try to fix ci * remove unused deps * fix aot contract executor not passing builtinstats --------- Co-authored-by: Esteve Soler Arderiu <esteve.soler@lambdaclass.com> Co-authored-by: Esteve Soler Arderiu <soler.arderiu@gmail.com> * Fix bug (#851) * Also fix felt bits in starknet syscall wrappers (#853) * Also fix felt bits in starknet syscall wrappers * style * missed * update version to alpha 4 (#854) * bytes31 * Better function attributes and re-enable >O1 opt (#843) * Fix felt252 and enum deserialization bugs. * Fix formatting. * Also fix the runtime. * Fix errors. * try to fix ci * remove unused deps * proper function attributes * add proper function attrs to optimize better, add some passes, run tests with atleast some opts * dont use remi * oops * maybe with opt level 3 now it works * test * works * readd deleted bench * remove dbg * Update bench-hyperfine.sh * fixci * comment * Update src/ffi.rs Co-authored-by: MrAzteca <azteca1998@users.noreply.github.com> --------- Co-authored-by: Esteve Soler Arderiu <esteve.soler@lambdaclass.com> Co-authored-by: Esteve Soler Arderiu <soler.arderiu@gmail.com> Co-authored-by: MrAzteca <azteca1998@users.noreply.github.com> * Resolve `CAIRO_NATIVE_RUNTIME_LIBRARY` relative path (#841) * feat(ffi): resolve runtime relative path using current dir * chore: remove mentions to old runtime variable * fix: typo --------- Co-authored-by: Bohdan Ohorodnii <limposfeed@gmail.com> * Implement secp * Fix bytes31 * try to fix ci (#858) * update implementing libfuncs doc (#856) * Fix bytes31 bug * Remove unused dep --------- Co-authored-by: FrancoGiachetta <francogiachetta27@gmail.com> Co-authored-by: Edgar <git@edgarluque.com> Co-authored-by: MrAzteca <azteca1998@users.noreply.github.com> Co-authored-by: Esteve Soler Arderiu <esteve.soler@lambdaclass.com> Co-authored-by: Esteve Soler Arderiu <soler.arderiu@gmail.com> Co-authored-by: Rodrigo <rodrodpino@gmail.com> Co-authored-by: Bohdan Ohorodnii <limposfeed@gmail.com>
…race-dump-contracts
✅ Code is now correctly formatted. |
592b2e4
to
1432029
Compare
a47431c
to
77c6815
Compare
77c6815
to
70bbef9
Compare
Benchmark results Main vs HEAD.Base
Head
Base
Head
Base
Head
Base
Head
Base
Head
Base
Head
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1077 +/- ##
==========================================
- Coverage 81.03% 81.01% -0.02%
==========================================
Files 110 110
Lines 30204 30241 +37
==========================================
+ Hits 24477 24501 +24
- Misses 5727 5740 +13 ☔ View full report in Codecov by Sentry. |
Benchmarking resultsBenchmark for program
|
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
20.745 ± 0.245 | 20.365 | 21.038 | 5.16 ± 0.14 |
cairo-native (embedded AOT) |
4.017 ± 0.097 | 3.899 | 4.174 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
4.063 ± 0.050 | 3.989 | 4.172 | 1.01 ± 0.03 |
Benchmark for program dict_snapshot
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
6.866 ± 0.219 | 6.621 | 7.251 | 1.66 ± 0.06 |
cairo-native (embedded AOT) |
4.172 ± 0.161 | 3.948 | 4.376 | 1.01 ± 0.04 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
4.132 ± 0.092 | 3.999 | 4.262 | 1.00 |
Benchmark for program factorial_2M
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
14.732 ± 0.201 | 14.388 | 14.950 | 3.32 ± 0.13 |
cairo-native (embedded AOT) |
4.436 ± 0.157 | 4.198 | 4.645 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
4.696 ± 0.348 | 4.221 | 5.183 | 1.06 ± 0.09 |
Benchmark for program fib_2M
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
15.769 ± 0.305 | 15.228 | 16.204 | 3.75 ± 0.09 |
cairo-native (embedded AOT) |
4.288 ± 0.085 | 4.173 | 4.436 | 1.02 ± 0.03 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
4.204 ± 0.062 | 4.107 | 4.334 | 1.00 |
Benchmark for program linear_search
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
6.936 ± 0.232 | 6.578 | 7.252 | 1.61 ± 0.07 |
cairo-native (embedded AOT) |
4.310 ± 0.108 | 4.143 | 4.533 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
4.376 ± 0.217 | 4.066 | 4.729 | 1.02 ± 0.06 |
Benchmark for program logistic_map
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
5.960 ± 0.088 | 5.845 | 6.145 | 1.46 ± 0.03 |
cairo-native (embedded AOT) |
4.095 ± 0.084 | 4.011 | 4.312 | 1.00 ± 0.03 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
4.080 ± 0.058 | 3.982 | 4.169 | 1.00 |
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.
This PR is related to #775
It updates it with recent changes but is also not mergeable until more cleanup is done
Checklist