-
Notifications
You must be signed in to change notification settings - Fork 82
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 nightly tests #2115
fix nightly tests #2115
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -267,7 +267,12 @@ pub fn gen_halo2_proof(pipeline: Pipeline<Bn254Field>, backend: BackendVariant) | |
// Setup | ||
let output_dir = pipeline.output_dir().clone().unwrap(); | ||
let setup_file_path = output_dir.join("params.bin"); | ||
let max_degree = pil.degrees().into_iter().max().unwrap(); | ||
let max_degree = pil | ||
.degree_ranges() | ||
.into_iter() | ||
.map(|range| range.max) | ||
.max() | ||
.unwrap(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this function is called for both Composite and Mono proofs, and it assumed all degrees were unique ranges before. This now takes the max of all max degrees for the halo2 setup |
||
buffered_write_file(&setup_file_path, |writer| { | ||
powdr_backend::BackendType::Halo2 | ||
.factory::<Bn254Field>() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,9 +43,7 @@ machine Main with degree: 256 { | |
Binary4 bin; | ||
Binary4x bin4; | ||
|
||
// two permutations to machine bin | ||
instr or X, Y -> Z link ~> Z = bin.or(X, Y); | ||
instr or_into_B X, Y link ~> B' = bin.or(X, Y); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unfortunately Halo2 has a bug somewhere and we can't do this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it possible to disable halo2 for the test instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we still want to run halo2 proofs for these tests to test permutations between machines There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But do we test the previous functionality somewhere else? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. language/compiler/witgen wise yes, the RISCV machine has this stuff and more |
||
|
||
// permutation to machine bin4 | ||
instr or4 X, Y, Z, W -> R link ~> R = bin4.or4(X, Y, Z, W); | ||
|
@@ -58,11 +56,6 @@ machine Main with degree: 256 { | |
A <== or(1,2); | ||
assert_eq A, 3; | ||
|
||
or_into_B 2,3; | ||
assert_eq B, 3; | ||
or_into_B 1,2; | ||
assert_eq B, 3; | ||
|
||
A <== or4(1,2,4,8); | ||
assert_eq A, 15; | ||
A <== or4(15,16,32,64); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,7 @@ machine Main with degree: 128 { | |
|
||
Binary4 bin; | ||
|
||
// two permutations to machine bin | ||
instr or X, Y -> Z link ~> Z = bin.or(X, Y); | ||
instr or_into_B X, Y link ~> B' = bin.or(X, Y); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here re halo2 |
||
|
||
instr assert_eq X, Y { X = Y } | ||
|
||
|
@@ -25,11 +23,6 @@ machine Main with degree: 128 { | |
A <== or(3,4); | ||
assert_eq A, 7; | ||
|
||
or_into_B 2,3; | ||
assert_eq B, 3; | ||
or_into_B 1,2; | ||
assert_eq B, 3; | ||
|
||
return; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,32 +14,11 @@ machine Main with degree: 32 { | |
instr sub X, Y -> Z link ~> Z = arith.sub(X, Y); | ||
instr assert_eq X, Y { X = Y } | ||
|
||
// instructions activating multiple permutations | ||
instr add_one X -> Y | ||
link ~> B = arith.add(X, 2) | ||
link ~> Y = arith.sub(B, 1) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here and below re halo2 |
||
{ | ||
} | ||
|
||
// multiple links with flags | ||
instr add_or_sub X, Y -> Z | ||
link if ADD ~> Z = arith.add(X, Y) | ||
link if (1 - ADD) ~> Z = arith.sub(X, Y); | ||
|
||
function main { | ||
A <== add(1, 1); | ||
A <== add(A, 1); | ||
A <== sub(A, 1); | ||
assert_eq A, 2; | ||
A <== add_one(A); | ||
assert_eq A, 3; | ||
|
||
ADD <=X= 1; | ||
A <== add_or_sub(2,5); | ||
assert_eq A, 7; | ||
ADD <=X= 0; | ||
A <== add_or_sub(A,5); | ||
assert_eq A, 2; | ||
|
||
return; | ||
} | ||
|
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.
these were caused by changing the asm test
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.
🃏