-
Notifications
You must be signed in to change notification settings - Fork 124
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
Custom combine functions for sumcheck (ReturningValueProgram) in rust #798
Conversation
… with custom combine function Signed-off-by: Koren-Brand <[email protected]>
|
||
// Friend function for C-api to have access to update the poly degree after generation | ||
template <typename T> | ||
friend void set_poly_degree(ReturningValueProgram<T>* program, int poly_degree); |
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.
move this function into generate_program.
implement new generate_program function at ReturningValueProgram that calls Program::generate_program and run the set poly degree code
icicle/src/program/program_c_api.cpp
Outdated
(*program)->generate_program(parameters_vec); | ||
set_poly_degree(*program, parameters_ptr[nof_parameters - 1]->m_operation->m_poly_degree); | ||
|
||
ReleasePool<Symbol<scalar_t>>& pool = ReleasePool<Symbol<scalar_t>>::instance(); |
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.
you can use ReleasePool<Symbol<scalar_t>>::instance().clear()
icicle/src/program/program_c_api.cpp
Outdated
ProgramHandle program = *returning_program; | ||
return CONCAT_EXPAND(FIELD, generate_program)(parameters_ptr, nof_parameters, &program); | ||
*program = create_empty_returning_value_program<scalar_t>(); | ||
std::vector<Symbol<scalar_t>> parameters_vec; |
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.
all this code is replicated - use function
…api, inserting poly_degree change into returning program's generate function Signed-off-by: Koren-Brand <[email protected]>
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.
much better
Fixed ReturningValueProgram creation in the rust wrapper
Added test checking Sumchek with a custom combine function