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

mem squish #241

Closed
wants to merge 1 commit into from
Closed

mem squish #241

wants to merge 1 commit into from

Conversation

ohad-starkware
Copy link
Contributor

@ohad-starkware ohad-starkware commented Dec 10, 2024

This change is Reviewable

Copy link
Contributor Author

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.

Copy link
Contributor

@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.

Reviewed 1 of 4 files at r1, all commit messages.
Reviewable status: 1 of 4 files reviewed, 2 unresolved discussions (waiting on @ohad-starkware)


stwo_cairo_prover/crates/prover/src/components/memory/memory_address_to_id/component.rs line 19 at r1 (raw file):

// during The merkle commitment and FRI, as this component is usually the tallest in the Cairo AIR.
// TODO(Ohad): Change split to 8 after seq is implemented. NOTE: it is possible to split further
// with an expansion trick similar to the one used in XOR. Investigate if it is worth it.

I don't like those changes as we probably need to change everything here again.
I think the correct approach is to use the EXPAND_BITS as we have in XOR.

Code quote:

// TODO(Ohad): Change split to 8 after seq is implemented. NOTE: it is possible to split further
// with an expansion trick similar to the one used in XOR. Investigate if it is worth it.

stwo_cairo_prover/out.txt line 1 at r1 (raw file):

Cool file but we don't need it in git :)

Copy link
Contributor

@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: 1 of 4 files reviewed, 4 unresolved discussions (waiting on @ohad-starkware)


stwo_cairo_prover/crates/prover/src/components/memory/memory_address_to_id/prover.rs line 83 at r1 (raw file):

        let next_multiple_of_16 = ((self.ids.len() + 15) >> 4) << 4;
        self.ids.resize(next_multiple_of_16, 0);
        self.multiplicities.resize(next_multiple_of_16, 0);

can we replace this by asserting that ids.len() >= 256?

Code quote:

        // Pad to a multiple of `N_LANES`.
        let next_multiple_of_16 = ((self.ids.len() + 15) >> 4) << 4;
        self.ids.resize(next_multiple_of_16, 0);
        self.multiplicities.resize(next_multiple_of_16, 0);

stwo_cairo_prover/crates/prover/src/components/memory/memory_address_to_id/component.rs line 59 at r1 (raw file):

    fn evaluate<E: EvalAtRow>(&self, mut eval: E) -> E {
        let address = eval.next_trace_mask();
        for i in 0..SPLIT_SIZE {

I think SPLIT_SIZE should be generic

Code quote:

for i in 0..SPLIT_SIZE {

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