-
Notifications
You must be signed in to change notification settings - Fork 249
chore(bench): make bits to prove customizable in zk benchmarks #2558
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
Conversation
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.
Just so I understand, the goal is to be able to benchmark with proofs that do not completely fill the max size supported by the crs ?
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @IceTDrinker)
tfhe/web_wasm_parallel_tests/worker.js
line 703 at r1 (raw file):
[64, [64]], [640, [640]], [2048, [2048, 64 * 3]],
I guess this comes from a real life usecase ?
@soonum currently seeing a conflict on that PR, if you can rebase ? |
2a924a7
to
4b83694
Compare
4b83694
to
fdcf026
Compare
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.
@nsarlin-zama yes
Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions (waiting on @nsarlin-zama and @soonum)
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.
Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions (waiting on @agnesLeroy, @IceTDrinker, and @nsarlin-zama)
tfhe/web_wasm_parallel_tests/worker.js
line 703 at r1 (raw file):
Previously, nsarlin-zama (Nicolas Sarlin) wrote…
I guess this comes from a real life usecase ?
Yes, from blockchain use case.
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.
A few questions
@IceTDrinker reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @agnesLeroy, @IceTDrinker, and @nsarlin-zama)
tfhe-benchmark/benches/integer/zk_pke.rs
line 52 at r2 (raw file):
let usable_cpu_threads = (rayon::current_num_threads() as u64 / max_threads).max(1) + 1; #[cfg(feature = "gpu")]
prefer if cfg!(feature = "gpu")
tfhe/web_wasm_parallel_tests/worker.js
line 700 at r2 (raw file):
{"crs_bit_size": 640, "bits_to_encrypt": [640]}, {"crs_bit_size": 2048, "bits_to_encrypt": [2048, 64 * 4]} // 64 * 4 is a production use-case //{"crs_bit_size": 4096, "bits_to_encrypt": [4096]}, // This case is too big and make webdriver timeout
that's odd, might be a crash ? does it work with integer ? Or the CRS gen is timing out in the browser, did you try with the integer bench ?
how is the timeout managed currently ? It's an old system, so could it be that the test
1de5613
to
e5a9e5a
Compare
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.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @agnesLeroy, @IceTDrinker, and @nsarlin-zama)
tfhe/web_wasm_parallel_tests/worker.js
line 700 at r2 (raw file):
Previously, IceTDrinker (Arthur Meyre) wrote…
that's odd, might be a crash ? does it work with integer ? Or the CRS gen is timing out in the browser, did you try with the integer bench ?
how is the timeout managed currently ? It's an old system, so could it be that the test
The timeout for this test currently is 3600 seconds.
I guess the CRS generation time plus the benchmarks exceed that duration.
I have to measure the 4096 case only to see how long it takes.
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.
small comment
Reviewable status: 0 of 2 files reviewed, 5 unresolved discussions (waiting on @agnesLeroy and @IceTDrinker)
tfhe-benchmark/benches/integer/zk_pke.rs
line 110 at r4 (raw file):
// Packing, so we take the message and carry modulus to compute our block count let num_block = 64usize.div_ceil( (param_pke.message_modulus.0 * param_pke.carry_modulus.0).ilog2() as usize,
You could reuse msg_bits
computed above here
tfhe-benchmark/benches/integer/zk_pke.rs
line 245 at r4 (raw file):
// Packing, so we take the message and carry modulus to compute our block count let num_block = 64usize.div_ceil( (param_pke.message_modulus.0 * param_pke.carry_modulus.0).ilog2() as usize,
same could use msg_bits
tfhe-benchmark/benches/integer/zk_pke.rs
line 505 at r4 (raw file):
// Packing, so we take the message and carry modulus to compute our block count let num_block = 64usize.div_ceil( (param_pke.message_modulus.0 * param_pke.carry_modulus.0).ilog2() as usize,
same
4bce34c
to
a2db574
Compare
build is red currently |
a2db574
to
eb856dd
Compare
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.
@IceTDrinker reviewed 2 of 2 files at r5, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @agnesLeroy, @IceTDrinker, and @soonum)
tfhe/web_wasm_parallel_tests/worker.js
line 700 at r2 (raw file):
Previously, soonum (David Testé) wrote…
The timeout for this test currently is 3600 seconds.
I guess the CRS generation time plus the benchmarks exceed that duration.
I have to measure the 4096 case only to see how long it takes.
you reverted the comment, so this cases passes now in 1h ?
Some application like blockchain, may wants to prove less bits than CRS size allows to.
eb856dd
to
860f38f
Compare
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.
Thanks !
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.
Reviewable status: 1 of 2 files reviewed, 5 unresolved discussions (waiting on @agnesLeroy and @soonum)
Some application like blockchain, may wants to prove less bits than CRS size allows to.
This change is