Skip to content
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

generate enabler column #333

Conversation

shaharsamocha7
Copy link
Contributor

@shaharsamocha7 shaharsamocha7 commented Jan 9, 2025

This change is Reviewable

Copy link
Contributor Author

shaharsamocha7 commented Jan 9, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

This was referenced Jan 9, 2025
Copy link
Contributor

@ohad-starkware ohad-starkware left a 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, 1 unresolved discussion (waiting on @shaharsamocha7)


stwo_cairo_prover/crates/prover/src/components/utils.rs line 87 at r1 (raw file):

/// The padding column is a MultiplicityColumn with the first `padding_offset` elements set to 1 and
/// the rest set to 0.
pub fn gen_padding_column(log_size: usize, padding_offset: usize) -> MultiplicityColumn {

I don't think this should go through the MultiplicityColumn logic
can you just generate a vector of simd elements? I think it should also be faster (calloc, memwrite, fix one vector in the middle)

@ohad-starkware
Copy link
Contributor

stwo_cairo_prover/crates/prover/src/components/utils.rs line 87 at r1 (raw file):

Previously, ohad-starkware (Ohad) wrote…

I don't think this should go through the MultiplicityColumn logic
can you just generate a vector of simd elements? I think it should also be faster (calloc, memwrite, fix one vector in the middle)

take only offset, the size is always next_power_of_2 right?
if not, logsize u32

Copy link
Contributor Author

@shaharsamocha7 shaharsamocha7 left a 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, 1 unresolved discussion (waiting on @ohad-starkware)


stwo_cairo_prover/crates/prover/src/components/utils.rs line 87 at r1 (raw file):

Previously, ohad-starkware (Ohad) wrote…

take only offset, the size is always next_power_of_2 right?
if not, logsize u32

Do you think it matters in terms of efficiency?

I just wanted the simplest implementation that would be clear what it is.
Using MultiplicityColumn to generate the padding column is the most clear to me, WDYT?

@shaharsamocha7 shaharsamocha7 force-pushed the 01-07-generate_enabler_column branch from 748e324 to 4886ee3 Compare January 9, 2025 12:50
@ohad-starkware
Copy link
Contributor

stwo_cairo_prover/crates/prover/src/components/utils.rs line 87 at r1 (raw file):

Previously, shaharsamocha7 wrote…

Do you think it matters in terms of efficiency?

I just wanted the simplest implementation that would be clear what it is.
Using MultiplicityColumn to generate the padding column is the most clear to me, WDYT?

it doesn't matter
IMO the simplest implementation will be doing the simplest thing, take a 0zed column, write 1s in the range you want.
and you won't have to call into_simd_vec().
also, what happens if we delete MultiplicityColumn and keep only the atomic one?

@ohad-starkware
Copy link
Contributor

stwo_cairo_prover/crates/prover/src/components/utils.rs line 87 at r1 (raw file):

Previously, ohad-starkware (Ohad) wrote…

it doesn't matter
IMO the simplest implementation will be doing the simplest thing, take a 0zed column, write 1s in the range you want.
and you won't have to call into_simd_vec().
also, what happens if we delete MultiplicityColumn and keep only the atomic one?

it doesn't matter in terms of efficiency*

Copy link
Contributor Author

@shaharsamocha7 shaharsamocha7 left a 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, 1 unresolved discussion (waiting on @ohad-starkware)


stwo_cairo_prover/crates/prover/src/components/utils.rs line 87 at r1 (raw file):

Previously, ohad-starkware (Ohad) wrote…

it doesn't matter in terms of efficiency*

so you don't think of the padding column as a multiplicity column?
I'm willing to change the impl, do you have a better name for this function?

@ohad-starkware
Copy link
Contributor

stwo_cairo_prover/crates/prover/src/components/utils.rs line 87 at r1 (raw file):

Previously, shaharsamocha7 wrote…

so you don't think of the padding column as a multiplicity column?
I'm willing to change the impl, do you have a better name for this function?

gen_enabler_column

@shaharsamocha7 shaharsamocha7 deleted the branch 01-07-Move_multiplicy_column_code_to_utils January 12, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants