[FEAT] Calculate Sumcheck's round polynomials more efficiently#884
[FEAT] Calculate Sumcheck's round polynomials more efficiently#884idanfr-ingo wants to merge 5 commits intomainfrom
Conversation
| tf::Executor m_executor; // execute all tasks accumulated on multiple threads | ||
|
|
||
| // functions | ||
| F lagrange_interpolation(const std::vector<F>& poly_evaluations, const F& x) const |
There was a problem hiding this comment.
This function is copied from the frontend. Please avoid that.
You can make it static and friend at the frontend and use it here.
There was a problem hiding this comment.
why friend function and not just a regular function outside the Sumcheck class?
There was a problem hiding this comment.
a valid option but making it public will enable the end user to also use it.
Not sure that we want to.
| break; | ||
| default: { | ||
| std::vector<F>& prev_round_polynomial = sumcheck_proof.get_round_polynomial(round_idx - 1); | ||
| alpha_value = lagrange_interpolation(prev_round_polynomial, alpha); |
There was a problem hiding this comment.
this might be the reason for the low performance on small sumchecks. the calculation of lagrange_interpolation might be longer for small MLE polynomials.
|
|
||
| for (int element_idx = start_element_idx; element_idx < start_element_idx + nof_iterations; ++element_idx) { | ||
| for (int k = 0; k < round_polynomial.size(); ++k) { | ||
| for (int k = 1; k < round_polynomial.size() - 1; ++k) { |
There was a problem hiding this comment.
please add explanation why you start from 1 and not 0
| } | ||
|
|
||
| for (int k = 0; k < round_polynomial.size(); ++k) { | ||
| for (int k = 1; k < round_polynomial.size(); ++k) { |
| // update_round_polynomial(element_idx, folded_mle_polynomials, mle_polynomial_size, program_executor, | ||
| // round_polynomial); | ||
| for (int k = 0; k < round_polynomial.size(); ++k) { | ||
| for (int k = 1; k < round_polynomial.size(); ++k) { |
mickeyasa
left a comment
There was a problem hiding this comment.
require more tests about the reason for small sumchecks delay
| @@ -111,6 +112,25 @@ namespace icicle { | |||
| worker_round_polynomial[worker_idx][k] = F::zero(); | |||
There was a problem hiding this comment.
isnt this loop suppose to run fro k=1 and not k=0?
No description provided.