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

Evmmax vectorized #1120

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Evmmax vectorized #1120

wants to merge 3 commits into from

Conversation

rodiazet
Copy link
Contributor

This PR implements PoC version of EVMMAX according to EIP-6690 (called vectorized, SIMD or sequential version).
Gas model is not updated yet.

test: Omit new opcodes with immediate params in unit tests

g
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 3.65854% with 316 lines in your changes missing coverage. Please review.

Project coverage is 18.64%. Comparing base (615e939) to head (723d8e5).

Files with missing lines Patch % Lines
lib/evmmax/evmmax.cpp 3.92% 98 Missing ⚠️
lib/evmone/instructions.hpp 0.00% 74 Missing ⚠️
test/unittests/evmmax_test.cpp 4.16% 69 Missing ⚠️
test/unittests/evmmax_instructions_test.cpp 5.35% 53 Missing ⚠️
test/utils/bytecode.hpp 0.00% 21 Missing ⚠️
lib/evmone/baseline_execution.cpp 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (615e939) and HEAD (723d8e5). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (615e939) HEAD (723d8e5)
eof_execution_spec_tests 1 0
unittests 1 0
execution_spec_tests 1 0
ethereum_tests 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1120       +/-   ##
===========================================
- Coverage   94.29%   18.64%   -75.65%     
===========================================
  Files         159      160        +1     
  Lines       17343    15679     -1664     
===========================================
- Hits        16354     2924    -13430     
- Misses        989    12755    +11766     
Flag Coverage Δ
eof_execution_spec_tests ?
ethereum_tests ?
ethereum_tests_silkpre 18.64% <3.65%> (-0.33%) ⬇️
execution_spec_tests ?
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
include/evmmax/evmmax.hpp 100.00% <100.00%> (ø)
lib/evmone/advanced_instructions.cpp 2.43% <ø> (-97.57%) ⬇️
lib/evmone/execution_state.hpp 87.23% <100.00%> (-7.51%) ⬇️
test/unittests/eof_validation_test.cpp 0.00% <ø> (-99.42%) ⬇️
test/unittests/instructions_test.cpp 0.00% <ø> (-89.59%) ⬇️
lib/evmone/baseline_execution.cpp 63.04% <0.00%> (-36.96%) ⬇️
test/utils/bytecode.hpp 13.30% <0.00%> (-84.05%) ⬇️
test/unittests/evmmax_instructions_test.cpp 5.35% <5.35%> (ø)
test/unittests/evmmax_test.cpp 2.45% <4.16%> (-92.86%) ⬇️
lib/evmone/instructions.hpp 68.11% <0.00%> (-31.89%) ⬇️
... and 1 more

... and 137 files with indirect coverage changes

@pdobacz
Copy link
Contributor

pdobacz commented Jan 30, 2025

Nice! Would it be unreasonable to, instead of 2 branches, just have both options (vectorized and not) available on 1 branch, with opcodes assigned somewhere arbitrarily and with heavily copy-pasted code? Or even same opcodes but a feature flag on the libevmone.so? I'm guessing there's going to be a lot of experimentation and measuring involved here, maybe it's better to plan for it from day 1?

@rodiazet
Copy link
Contributor Author

Good point. I can think of some c++ macro which enables requested version or maybe introduce a runtime flag.

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.

2 participants