-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fully implement irregular block shapes (#2281)
With #2304, JITed block machine witgen functions can already access the previous row in the last block. With this PR, functions that actually do that are no longer filtered out. Changes: - The accessed cells are now checked properly (not just looking at assignments) - Instead of filtering out functions that access outside the bound `0..block_size`, we *assert* that the accessed cells are in the bounds `-1..block_size`. This is sufficient in practice (all the tests pass), although in theory the block machine processor could generate generate accesses to row `block_size` and even `block_size + 1` (via next references). I'm not sure if that's worth handling though if it never happens in practice, so I figured it's best to fail hard if it does happen, so we know when we do need to handle it. As a result, we now use the JIT path for 2 machines in the Keccak RISC-V example: ``` Secondary machine 0: main_binary (BlockMachine): 50462 / 50462 blocks computed via JIT. 201848 of 262144 rows are used in machine 'Secondary machine 0: main_binary (BlockMachine)'. 40128 of 65536 rows are used in machine 'Secondary machine 1: main_memory (DoubleSortedWitnesses32)'. Secondary machine 2: main_poseidon_gl (BlockMachine): 0 / 1 blocks computed via JIT. 31 of 32 rows are used in machine 'Secondary machine 2: main_poseidon_gl (BlockMachine)'. 361974 of 524288 rows are used in machine 'Secondary machine 4: main_regs (DoubleSortedWitnesses32)'. Secondary machine 5: main_shift (BlockMachine): 11734 / 11734 blocks computed via JIT. 46936 of 65536 rows are used in machine 'Secondary machine 5: main_shift (BlockMachine)'. Secondary machine 6: main_split_gl (BlockMachine): 0 / 7 blocks computed via JIT. 56 of 64 rows are used in machine 'Secondary machine 6: main_split_gl (BlockMachine)'. ``` --------- Co-authored-by: chriseth <[email protected]>
- Loading branch information
1 parent
40aa582
commit 725fceb
Showing
6 changed files
with
100 additions
and
22 deletions.
There are no files selected for viewing
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
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
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
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
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
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
725fceb
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.
Possible performance regression was detected for benchmark 'Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.20
.executor-benchmark/keccak
11995307129
ns/iter (± 33172172
)8898077628
ns/iter (± 54759768
)1.35
This comment was automatically generated by workflow using github-action-benchmark.