FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Native Sumcheck Layer Evaluation by darth-cy · Pull Request #8 · scroll-tech/openvm · GitHub

Native Sumcheck Layer Evaluation - #8

Merged
kunxian-xia merged 44 commits into
mainfrom
feat/native_sumcheck_layer_eval
Nov 25, 2025
Merged

Native Sumcheck Layer Evaluation#8
kunxian-xia merged 44 commits into
mainfrom
feat/native_sumcheck_layer_eval

Conversation

darth-cy commented Sep 17, 2025
edited by kunxian-xia
Loading

Copy link
Copy Markdown

Summary

  • Add a custom opcode SUMCHECK_LAYER_EVAL for calculating layer evaluation.

    1. For GKR product iop, the main sumcheck has the form v'[b] = v[b,0] * v[b,1];
    2. For GKR logup iop, the main sumcheck has the form p'[b] = p[b,0]*q[b,1] + p[b,1]*q[b,0], q'[b] = q[b,0]*q[b,1]
  • The new added opcode supports two modes:

    1. calculate the expected evaluation of two types of sumchecks;
    2. calculate the expected value of next layer p[r] = eq(0,r)*p[0] + eq(1,r)*p[1].

Layout

Each row is able to process 1 product sumcheck or 1 logup sumcheck.

Performance

layout for new chip NativeSumcheck

air quotient deg prep cols main cols perm cols
NativeSumcheckAir Quotient Deg = 2 Prep Cols = 0 Main Cols = [110] Perm Cols = [132]

darth-cy marked this pull request as draft September 25, 2025 20:09
darth-cy marked this pull request as ready for review September 29, 2025 01:56
kunxian-xia self-requested a review November 6, 2025 01:53
Comment thread extensions/native/compiler/src/lib.rs Outdated

self.memory_bridge
.read(
MemoryAddress::new(self.address_space, register_ptrs[0] + AB::F::from_canonical_usize(EXT_DEG * 2 - 1) + curr_prod_n),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

why -1 ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I see, since curr_prod_n starts from 1.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The formula is rewritten to make sure it's clear the -1 is grouped with curr_prod_n. Comment added.


self.memory_bridge
.read(
MemoryAddress::new(self.address_space, register_ptrs[0] + AB::F::from_canonical_usize(EXT_DEG * 2 - 1) + ctx[1] + curr_logup_n),

kunxian-xia Nov 17, 2025
edited
Loading

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

why -1?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The formula is rewritten to make sure it's clear the -1 is grouped with curr_logup_n. Comment added.

kunxian-xia mentioned this pull request Nov 19, 2025
8 tasks
kunxian-xia merged commit 8c2d257 into main Nov 25, 2025
2 of 28 checks passed
kunxian-xia mentioned this pull request Nov 27, 2025
kunxian-xia added a commit that referenced this pull request Nov 30, 2025
* wip

* wip2

* wip3

* wip4

* wip5

* replace variable position by name

* wip6

* wip7

* clippy

* wip8

* wip9

* wip10

* wip11

* wip12

* wip13

* wip14

* wip15

* clippy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL