feat: new execution e4 for memory adapters#1733
Conversation
9036481 to
4387c0f
Compare
CodSpeed WallTime Performance ReportMerging #1733 will not alter performanceComparing
|
This comment was marked as outdated.
This comment was marked as outdated.
2ec5487 to
d4a85fe
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
de3280d to
77e9fc5
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| fn set_meta_block( | ||
| &mut self, | ||
| address: MemoryAddress<u32, u32>, | ||
| address_space: usize, |
There was a problem hiding this comment.
don't need to change it, but using u32 instead of usize might allow the compiler to do some stuff more efficiently(?)
There was a problem hiding this comment.
I believe the compiler should be able to find that we usually essentially do address_space as u32 so it should treat it like u32, at least most of the time, but yes, I keep in mind that we probably need to unify those usize <-> u32 conversions more
|
Latest reth benchmark comparison: https://github.com/axiom-crypto/openvm-reth-benchmark/actions/runs/16016116215 |
…envm-org/openvm into feat/new-execution-e4-memory-adapters
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Commit: 31361a7 |
This resolves INT-4116.
The main change is: access adapter inventory now has (one) dense record arena that is used for all memory adapter records.
One record describes an act of either splitting a memory block into chunks of size
lowest_block_size(usually equal to current address space's alignment, except maybe on initialization/finalization), or merging a memory block from chunks of sizelowest_block_size, given their timestamps.Example: one record can look like "at time
123and address(2, 28)take a block of size32and merge from blocks of size4, their timestamps were[3, 1, 4, 1, 5, 9, 2, 6]". In tracegen this record will generate one row inAdapter<32>, two rows inAdapter<16>, and four rows inAdapter<8>.To generate trace, which we do for all adapter chips at once, we currently just iterate over all records sequentially and write into the already allocated trace matrices. We could first do a sequential scan to find, for each record, which rows in the matrices it corresponds to, and then fill them in parallel. We could also create more arenas (namely one per
(block_size, lowest_block_size)), and then each pair "(arena, adapter)" defines a constant number of rows in this adapter's trace matrix per record, which would remove the need to scan first. However, this is out of scope of this PR.Reth benchmark: https://github.com/axiom-crypto/openvm-reth-benchmark/actions/runs/16029214229