Skip to content

Commit

Permalink
some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tabaie committed Sep 13, 2024
1 parent 7596a65 commit 9c23552
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion prover/circuits/bench/constraints/blobdecompression/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ func main() {
BlobBytes: make([]frontend.Variable, 32*4096),
Dict: make([]frontend.Variable, 64*1024),
MaxBlobPayloadNbBytes: blob.MaxUncompressedBytes,
UseGkrMiMC: true,
}

p := profile.Start(profile.WithPath(fmt.Sprintf("blobdecompression-%sK.pprof", formatFloat(blob.MaxUncompressedBytes/1024.0))))
p := profile.Start(profile.WithPath(fmt.Sprintf("blobdecompression-gkrmimc-%sK.pprof", formatFloat(blob.MaxUncompressedBytes/1024.0))))

if _, err := frontend.Compile(ecc.BLS12_377.ScalarField(), scs.NewBuilder, &c, frontend.WithCapacity(1<<27)); err != nil {
panic(err)
Expand Down
Binary file not shown.
Binary file not shown.
4 changes: 3 additions & 1 deletion prover/circuits/bench/constraints/pi-interconnection/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ func main() {
ExecutionMaxNbMsg: 16,
L2MsgMerkleDepth: 5,
L2MsgMaxNbMerkle: 10,
MockKeccakWizard: true,
}, dummy.Compile) // TODO The output of this bench is not worth much until we come up with proper Wizard compilation parameters.

var t test_utils.FakeTestingT
assert.NoError(t, err)

p := profile.Start(profile.WithPath("pi-interconnection.pprof"))
c.Circuit.UseGkrMimc = false
p := profile.Start(profile.WithPath("pi-interconnection-nowizard-nogkr.pprof"))
_, err = frontend.Compile(ecc.BLS12_377.ScalarField(), scs.NewBuilder, c.Circuit, frontend.WithCapacity(1<<27))
p.Stop()
assert.NoError(t, err)
Expand Down
3 changes: 3 additions & 0 deletions prover/circuits/bench/constraints/pi-interconnection/run-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
go run .
telegram-file nohup.out
shutdown
2 changes: 1 addition & 1 deletion prover/circuits/bench/constraints/to-pdf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ find "." -type f -name "*.pprof" | while read -r file; do
# Extract filename without extension
title="${filename%.*}"

cmd=$"go tool pprof -pdf "$file" > "$title.pprof.pdf""
cmd=$"go tool pprof -pdf "$file" > "$title.pdf""
echo $cmd
eval $cmd

Expand Down

0 comments on commit 9c23552

Please sign in to comment.