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

Improve constant evaluation logging #2083

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

georgwiese
Copy link
Collaborator

@georgwiese georgwiese commented Nov 13, 2024

I noticed that constant evaluation takes a very long time. With this logging, it is easier to see why, e.g. for the Rust Keccak example:

  Generated values for main_poseidon_gl::CLK[0] (32..4194304) in 5.11s
  Generated values for main_poseidon_gl::CLK[1] (32..4194304) in 5.77s
  Generated values for main_poseidon_gl::CLK[2] (32..4194304) in 5.39s
  Generated values for main_poseidon_gl::CLK[3] (32..4194304) in 5.12s
  Generated values for main_poseidon_gl::CLK[4] (32..4194304) in 6.32s
  Generated values for main_poseidon_gl::CLK[5] (32..4194304) in 6.25s
  Generated values for main_poseidon_gl::CLK[6] (32..4194304) in 4.92s
  Generated values for main_poseidon_gl::CLK[7] (32..4194304) in 5.48s
  Generated values for main_poseidon_gl::CLK[8] (32..4194304) in 5.39s
  Generated values for main_poseidon_gl::CLK[9] (32..4194304) in 5.85s
  Generated values for main_poseidon_gl::CLK[10] (32..4194304) in 5.84s
  Generated values for main_poseidon_gl::CLK[11] (32..4194304) in 5.23s
  Generated values for main_poseidon_gl::CLK[12] (32..4194304) in 6.04s
  Generated values for main_poseidon_gl::CLK[13] (32..4194304) in 6.08s
  Generated values for main_poseidon_gl::CLK[14] (32..4194304) in 4.88s
  Generated values for main_poseidon_gl::CLK[15] (32..4194304) in 5.93s
  Generated values for main_poseidon_gl::LASTBLOCK (32..4194304) in 12.95s
Fixed column generation took 108.75529s

@georgwiese georgwiese force-pushed the improve-constant-evaluation-logging branch from 9ee4850 to e5ec7b5 Compare November 13, 2024 14:45
@georgwiese georgwiese marked this pull request as ready for review November 13, 2024 14:51
@leonardoalt leonardoalt added this pull request to the merge queue Nov 13, 2024
Merged via the queue into main with commit 0913624 Nov 13, 2024
14 checks passed
@leonardoalt leonardoalt deleted the improve-constant-evaluation-logging branch November 13, 2024 18:44
github-merge-queue bot pushed a commit that referenced this pull request Nov 14, 2024
After analyzing what is taking such a long time when evaluating fixed
column (#2083), I noticed that the Poseidon machine uses the default
degree range, independent of the `--max-degree-log` degree log.

I set it to `LARGE_SUBMACHINES_MAX_DEGREE` instead, which means that it
is 4x larger than the main machine. Given a block size of 31, that means
that it has enough rows if at most 1 / 8 (=12.5%) of the CPU
instructions are calls to Poseidon, which should be enough?

For `--max-degree-log 18`, this reduces the time to evaluate constant
columns from 109s to 33s.
Schaeff pushed a commit that referenced this pull request Nov 14, 2024
After analyzing what is taking such a long time when evaluating fixed
column (#2083), I noticed that the Poseidon machine uses the default
degree range, independent of the `--max-degree-log` degree log.

I set it to `LARGE_SUBMACHINES_MAX_DEGREE` instead, which means that it
is 4x larger than the main machine. Given a block size of 31, that means
that it has enough rows if at most 1 / 8 (=12.5%) of the CPU
instructions are calls to Poseidon, which should be enough?

For `--max-degree-log 18`, this reduces the time to evaluate constant
columns from 109s to 33s.
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