-
Notifications
You must be signed in to change notification settings - Fork 21
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
test(ivc): test of folding W #75
Conversation
WIP: Decompose fold of W & call
- rm few unnecessary clones (like `.to_vec()`) - rm unnecessary tmp vectors - rm multiply iterations by bits
8cc3236
to
6c98135
Compare
ed275f7
to
8812362
Compare
@chaosma I decomposed |
} | ||
|
||
// TODO Change design | ||
pub(crate) fn postpone_assembly(&mut self) { |
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.
what's the purpose to split fn assembly into 3 small functions? Especially, do we need a postpone method?
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.
I just haven't chosen the final design for using TableData in IVC yet, but it definitely won't be an assembly
function, so I've summarised all the code that isn't about halo2::Circuit
good point. We can definitely move prepare part into the |
@chaosma In that case, I'll mv prepare part to the |
@chaosma We still need the @cyphersnake Do you mean each time configure over cs, call |
Added docs & decided not to touch What do you think? |
let rW = ecc.scalar_mul(region, W2, r)?; | ||
Ok(ecc.add(region, W1, &rW)?) | ||
let res = ecc.add(region, W1, &rW)?; | ||
debug!( |
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.
NBD: I usually will remove debug code after testing.
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.
This is not dbg!
this is log::debug!
expression. The lowest level of logs, even lower log::trace!
It's off on a real running system because of verbosity, but for debugging some cases it can stay on.
I left it here meaningfully
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.
This is just handy for projects under active development, to include the most detailed action log possible at any time, rather than adding debug messages every time.
Such more generalised code for debugging, which at the TRACE level and above does not give any overhead
.map(|(W_index, (W1, W2))| { | ||
let rW = best_multiexp(&[*r], &[W2]).into(); | ||
let res = *W1 + rW; | ||
debug!( |
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.
NBD: remove debug code after debugging
Now the real use case scenario is to call I can do well now and generalise the |
@cyphersnake From our conversation, you decide not to touch the TableData code? In this case, are you planning to remove the prepare and postpone code? |
@chaosma No, what is meant is not to finalize the design changes, but to leave the refactoring as it is already in use (I need the prepare function as the tests will break without it). Alternatively, I can update the draft of the IVC API that uses |
Part of #32
Test with NIFS & IVC folding of
W