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

fix: runtime sharding #181

Merged
merged 5 commits into from
Feb 10, 2024
Merged

fix: runtime sharding #181

merged 5 commits into from
Feb 10, 2024

Conversation

ctian1
Copy link
Member

@ctian1 ctian1 commented Feb 10, 2024

also changes debug_constraints to print the offending row

// Every `shard_size` cycles, increment shard and reset clk within the shard.
if self.state.global_clk % self.shard_size == 0 && !self.unconstrained {
// If there's not enough cycles left for another instruction, move to the next shard.
if !self.unconstrained && max_syscall_cycles + self.state.clk >= self.shard_size * 4 {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you leave a comment as to why the self.shard_size * 4 is the max_clk?

@@ -75,7 +77,14 @@ pub fn debug_constraints<F: PrimeField, EF: ExtensionField<F>, A>(
builder.is_transition = F::zero();
}

air.eval(&mut builder);
let result = catch_unwind(AssertUnwindSafe(|| {
Copy link
Contributor

Choose a reason for hiding this comment

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

do you mean to keep this in?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah i think its useful

@ctian1 ctian1 merged commit 2c4e34f into main Feb 10, 2024
3 checks passed
@puma314 puma314 deleted the chris/shards-fix branch February 14, 2024 07:21
jtguibas pushed a commit that referenced this pull request Mar 29, 2024
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