-
Notifications
You must be signed in to change notification settings - Fork 12
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
optimize witness cloning #89
Merged
Merged
Conversation
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
hero78119
force-pushed
the
feat/optimize_witness_cloning
branch
from
July 11, 2024 13:04
18abe90
to
824a251
Compare
hero78119
force-pushed
the
feat/optimize_witness_cloning
branch
2 times, most recently
from
July 15, 2024 07:44
9492c41
to
4226a3e
Compare
hero78119
force-pushed
the
ming/rewrite_phase1
branch
from
July 15, 2024 12:41
ad4a6d8
to
e843bf1
Compare
hero78119
force-pushed
the
feat/optimize_witness_cloning
branch
from
July 24, 2024 07:50
4226a3e
to
9794631
Compare
circuit witness: direct witness on mle devirgo style on phase1_output
hero78119
force-pushed
the
feat/optimize_witness_cloning
branch
from
August 20, 2024 08:50
9794631
to
8fdfd0b
Compare
hero78119
force-pushed
the
feat/optimize_witness_cloning
branch
from
August 21, 2024 03:46
3843194
to
5ec37ec
Compare
hero78119
force-pushed
the
feat/optimize_witness_cloning
branch
from
August 23, 2024 04:19
8500503
to
392c770
Compare
* optimize sumcheck algo circuit witness: direct witness on mle devirgo style on phase1_output * initial version for new zkVM design * riscv add prototype implementation * add new zkVM prover * new package ceno_zkvm * record witness generation * add transcript * add verifier * code cleanup * rename expression * prover record_r/record_w sumcheck * main sel sumcheck proof/verify * tower product witness inference * tower product sumcheck prove/verify * chores: fix tower sumcheck witness length error and clean up * verify record and zero expression * tower sumcheck prove/verify pass * WIP test main sel prove/verify * add benchmark * chores: interleaving with default value * main constraint sumcheck prove/verify pass * chores: mock witness * main constraint sumcheck verify final claim assertion pass * restructure ceno_zkvm package * refine expression format * wip lookup * lookup in logup implemetation with integration test pass * chores: code cosmetics * optimize with 2-stage sumcheck #103 * chores: refine virtual polys naming * fix proper ts and pc counting * try sumcheck bench * refine global state in riscv * degree > 1 main constraint sumcheck implementation #107 (#108) * monomial expression to virtual poly * degree > 1 sumcheck batched with main constraint * succint selector evaluation * refine succint selector evaluation formula and documentation * wip fix interleaving edge case * deal with interleaving_mles instance = 1 case * chores: code cosmetics and address review comments * fix logup padding with chip record challenge * riscv opcode type & combine add/sub opcode & dependency trim * ci whitelist ceno_zkvm lint/clippy * address review comments and naming cosmetics * remove unnessesary to_vec operation * tower verifier logup p(x) constant check * cleanup and hide thread-based logic * soundness fix: derive new sumcheck batched challenge for each round * fix sel evaluation point and add TODO check * fix sumcheck batched challenge deriving order * chore: rename pc step size & fine tune project structure * fix lint error
hero78119
added a commit
that referenced
this pull request
Sep 30, 2024
* optimize sumcheck algo circuit witness: direct witness on mle devirgo style on phase1_output * temporarily exclude singer-pro from default workspace members * fux build error in mpcs * [Experiment] new zkVM design (#91) * optimize sumcheck algo circuit witness: direct witness on mle devirgo style on phase1_output * initial version for new zkVM design * riscv add prototype implementation * add new zkVM prover * new package ceno_zkvm * record witness generation * add transcript * add verifier * code cleanup * rename expression * prover record_r/record_w sumcheck * main sel sumcheck proof/verify * tower product witness inference * tower product sumcheck prove/verify * chores: fix tower sumcheck witness length error and clean up * verify record and zero expression * tower sumcheck prove/verify pass * WIP test main sel prove/verify * add benchmark * chores: interleaving with default value * main constraint sumcheck prove/verify pass * chores: mock witness * main constraint sumcheck verify final claim assertion pass * restructure ceno_zkvm package * refine expression format * wip lookup * lookup in logup implemetation with integration test pass * chores: code cosmetics * optimize with 2-stage sumcheck #103 * chores: refine virtual polys naming * fix proper ts and pc counting * try sumcheck bench * refine global state in riscv * degree > 1 main constraint sumcheck implementation #107 (#108) * monomial expression to virtual poly * degree > 1 sumcheck batched with main constraint * succint selector evaluation * refine succint selector evaluation formula and documentation * wip fix interleaving edge case * deal with interleaving_mles instance = 1 case * chores: code cosmetics and address review comments * fix logup padding with chip record challenge * riscv opcode type & combine add/sub opcode & dependency trim * ci whitelist ceno_zkvm lint/clippy * address review comments and naming cosmetics * remove unnessesary to_vec operation * tower verifier logup p(x) constant check * cleanup and hide thread-based logic * soundness fix: derive new sumcheck batched challenge for each round * fix sel evaluation point and add TODO check * fix sumcheck batched challenge deriving order * chore: rename pc step size & fine tune project structure * fix lint error
This was referenced Oct 4, 2024
This broke |
hero78119
pushed a commit
that referenced
this pull request
Oct 14, 2024
Fixes #313 Commit 0a40721 from #89 broke `singer-pro`. At least judging by whether `cargo check` succeeds. It even has a commit about that [temporarily exclude singer-pro from default workspace members](5ec37ec). Please restore `singer-pro` from the git history, if/when you need it again. Also remove `singer/examples/add-v2-old-sc-bak.rs` which was broken by the same commit. The filename suggests it was kept around as a 'backup'? (Please, have some more faith in git's ability to keep history!)
} | ||
|
||
const VALUE_BIT_WIDTH: usize = 16; | ||
pub type WitnessId = u16; |
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.
Why did we go with u16
here?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR applied a widely refactor, and the goals is to avoid wire_in/wire_out clone between GKR nodes during proving. The core ideas are to
DenseMultilinearExtension
directly as input wire_in, avoiding extra overhead ofLayerWitness
conversionRangedMultilinearExtension
which wraps a reference of mle, plus astart
/offset
to specify which range belong to it. This can avoid layer poly creation per multi-threading.This PR tried to prepare for the foundation for potiential widely refactor required from
A preliminary test shows 1.5x throughtput improvement on
evm_add
benchmark under instance size 2^11 - 14