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

feat: Improve reported stats in the Loop example #1245

Closed
wants to merge 34 commits into from

Conversation

Cardosaum
Copy link
Contributor

@Cardosaum Cardosaum commented Dec 19, 2023

Incorporate stats from lift, join, adding timings for each step.

$ target/release/examples/loop --join

|     Cycles |   Segments |       Exec |      Prove |       Lift |       Join |   Duration |        RAM |       Seal |      Speed |
|         64 |          1 |     18.4ms |      1.25s |      2.21s |        0ns |      3.47s |    962.6MB |    215.3kB |    18.9khz |
|        128 |          1 |     20.7ms |      2.33s |      2.25s |        0ns |       4.6s |    962.6MB |    238.3kB |    28.5khz |
|        256 |          1 |     23.9ms |      4.55s |      2.21s |        0ns |      6.78s |     1.68GB |      250kB |    38.6khz |
|        512 |          1 |     30.3ms |      8.65s |       2.2s |        0ns |     10.88s |     3.36GB |    262.2kB |    48.2khz |
|         1k |          1 |     41.5ms |     18.78s |      2.25s |        0ns |     21.07s |     6.72GB |    275.5kB |    49.8khz |
|         2k |          2 |      110ms |     38.72s |      4.55s |      2.35s |     45.73s |     6.72GB |      551kB |    45.9khz |
|       4.1k |          4 |    220.5ms |     1:16.8 |      8.91s |      7.12s |       1:33 |     6.72GB |      1.1MB |    45.1khz |

Copy link

vercel bot commented Dec 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2024 3:15pm

@flaub
Copy link
Member

flaub commented Jan 3, 2024

I'd like to see speed numbers rather than (or maybe in addition to) raw duration numbers for exec, prove, etc.

@flaub
Copy link
Member

flaub commented Jan 3, 2024

Can we put N/A instead of 0ns?

@flaub
Copy link
Member

flaub commented Jan 3, 2024

I'm not sure lift/join makes a lot of sense for the loop example. How about we put this all under cargo risczero benchmark and then print basically what Parker's tool is doing?

@Cardosaum
Copy link
Contributor Author

@flaub

Adding speed information for each step would look like this:

|      Cycles |    Segments |         RAM |        Seal |   Exec time |  Prove time |   Lift time |   Join time |  Total time |  Exec speed | Prove speed |  Lift speed |  Join speed | Total Speed |
|          64 |           1 |     962.6MB |     215.3kB |      18.6ms |       1.29s |       2.34s |         N/A |       3.65s |      3.5Mhz |     50.7khz |     28.1khz |         N/A |       18khz |
|         128 |           1 |     962.6MB |     238.3kB |      20.1ms |       2.39s |       2.23s |         N/A |       4.64s |      6.5Mhz |     54.9khz |     58.8khz |         N/A |     28.3khz |
|         256 |           1 |      1.68GB |       250kB |      24.8ms |       4.67s |       2.24s |         N/A |       6.93s |     10.6Mhz |     56.2khz |    116.9khz |         N/A |     37.8khz |
|         512 |           1 |      3.36GB |     262.2kB |      31.7ms |        9.7s |       2.27s |         N/A |         12s |     16.5Mhz |     54.1khz |    230.9khz |         N/A |     43.7khz |
|          1k |           1 |      6.72GB |     275.5kB |      42.1ms |      20.59s |       2.29s |         N/A |      22.92s |     24.9Mhz |     50.9khz |    457.3khz |         N/A |     45.7khz |
|          2k |           2 |      6.72GB |       551kB |     110.9ms |      43.07s |       4.69s |       2.47s |      50.34s |     18.9Mhz |     48.7khz |    447.4khz |    849.2khz |     41.7khz |
|        4.1k |           4 |      6.72GB |       1.1MB |     226.9ms |      1:20.9 |       9.13s |        7.4s |      1:37.6 |     18.5Mhz |     51.9khz |    459.4khz |    567.1khz |       43khz |

Would you want to have this in the loop example, or would you prefer to drop it from here and use it only in cargo risczero benchmark?

@pdg744
Copy link
Contributor

pdg744 commented Jan 3, 2024

image

i think these should say 64k, 128k, ... 1M, 2M,...

@pdg744
Copy link
Contributor

pdg744 commented Jan 3, 2024

if we've run lift and join, shouldn't the seal size be back to ~200kB?
image

@flaub
Copy link
Member

flaub commented Jan 3, 2024

I think we should make a new cargo risczero benchmark command that has this output:

cycles:     997685
segments:   2
exec:       125.12813ms
prove:      [12.153576671s, 773.772782ms]
lift:       [1.411728127s, 1.293531374s]
prove+lift: 13.565304798s
join:       [1.659020277s]

@Cardosaum Cardosaum closed this Jan 3, 2024
@Cardosaum
Copy link
Contributor Author

Closing this PR in favor of adding this information to cargo risczero benchmark.

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.

None yet

3 participants