-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add daily block execution #888
Conversation
Benchmark results Main vs HEAD.
|
Benchmarking resultsBenchmark for program
|
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
10.849 ± 0.276 | 10.519 | 11.268 | 23.62 ± 0.60 |
cairo-native (embedded AOT) |
3.140 ± 0.018 | 3.116 | 3.171 | 6.84 ± 0.04 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
3.172 ± 0.022 | 3.144 | 3.215 | 6.91 ± 0.05 |
cairo-native (standalone AOT) |
0.662 ± 0.002 | 0.659 | 0.666 | 1.44 ± 0.01 |
cairo-native (standalone AOT with -march=native) |
0.459 ± 0.001 | 0.458 | 0.460 | 1.00 |
Benchmark for program fib_2M
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
10.906 ± 0.230 | 10.435 | 11.179 | 1475.78 ± 32.46 |
cairo-native (embedded AOT) |
2.678 ± 0.015 | 2.659 | 2.704 | 362.42 ± 3.01 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2.721 ± 0.012 | 2.705 | 2.738 | 368.13 ± 2.85 |
cairo-native (standalone AOT) |
0.007 ± 0.000 | 0.007 | 0.008 | 1.00 |
cairo-native (standalone AOT with -march=native) |
0.008 ± 0.000 | 0.008 | 0.009 | 1.09 ± 0.01 |
Benchmark for program logistic_map
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
4.292 ± 0.019 | 4.256 | 4.327 | 59.99 ± 0.31 |
cairo-native (embedded AOT) |
2.857 ± 0.013 | 2.841 | 2.879 | 39.93 ± 0.21 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
3.008 ± 0.022 | 2.978 | 3.044 | 42.04 ± 0.33 |
cairo-native (standalone AOT) |
0.116 ± 0.000 | 0.115 | 0.117 | 1.62 ± 0.01 |
cairo-native (standalone AOT with -march=native) |
0.072 ± 0.000 | 0.071 | 0.072 | 1.00 |
e8e5822
to
d1bc941
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #888 +/- ##
=======================================
Coverage 82.91% 82.91%
=======================================
Files 120 120
Lines 33866 33866
=======================================
Hits 28081 28081
Misses 5785 5785 ☔ View full report in Codecov by Sentry. |
fcb28f7
to
58546b0
Compare
fcd7b0d
to
3a7efd8
Compare
3a7efd8
to
881944b
Compare
881944b
to
22a73e8
Compare
- name: Run with Native | ||
run: | | ||
BLOCK_START=${{ matrix.block }} | ||
BLOCK_END=$(($BLOCK_START + $RANGE_SIZE - 1)) | ||
cargo run --release --features state_dump block-range $BLOCK_START $BLOCK_END mainnet | ||
continue-on-error: true | ||
- name: Run with VM | ||
run: | | ||
BLOCK_START=${{ matrix.block }} | ||
BLOCK_END=$(($BLOCK_START + $RANGE_SIZE - 1)) | ||
cargo run --release --features state_dump,only_cairo_vm block-range $BLOCK_START $BLOCK_END mainnet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is meant to be run during night, I don't really know if this could make a significant impact on the time it takes to complete the ci once we increased the amount of blocks to execute. But it might be a good idea to run both native and the vm at the same time to reduce the execution time, right?.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered it, but I think is not that simple. As I understand it, we have two possible approaches:
The first approach (used in the starknet-blocks
workflow) is to have two separate jobs, one uses a matrix to execute different blocks with native and VM, then uploads an artifact with the state dumps. Another job depends on the first one, retreives the artifact, and compares the states.
The downside with this approach is that if one of the executions fails, then the compare
job is never ran. This is not desirable, as an RPC error is pretty common when running so many blocks, and would cancel the whole daily execution. There might be a way to work around this, but I don't know how.
This is why I opted for a different approach. Use a matrix, but each job in the matrix is complete and independent from the other ones. A failure in one execution would not cancel the other ones, as they are completely separate. The comparison would not have to wait for the whole execution, as each subcomparison could start as soon as the corresponding execution finishes.
The downside of this is that we cannot run VM and Native at the same time, but I don't think that it matters to much, as we can always increase the amount of jobs in the matrix if we want more parallelism.
Closes #850
You can find an example on how the workflow looks like here
It should work better once lambdaclass/starknet-replay#78 is merged