-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f56d31
commit 74e3d20
Showing
14 changed files
with
97 additions
and
206 deletions.
There are no files selected for viewing
Submodule ceno
updated
8 files
+3 −0 | Cargo.lock | |
+2 −0 | Cargo.toml | |
+2 −0 | ceno_host/Cargo.toml | |
+34 −0 | ceno_host/examples/sorting_prepare_witness.rs | |
+2 −2 | ceno_host/tests/test_elf.rs | |
+2 −2 | ceno_zkvm/Cargo.toml | |
+2 −1 | examples/Cargo.toml | |
+7 −7 | examples/examples/sorting.rs |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
# Prep | ||
( | ||
( | ||
cd ceno/examples | ||
cargo build --release --example=quadratic_sorting | ||
) | ||
( | ||
cd ceno | ||
cargo build --release --bin e2e | ||
) | ||
|
||
mkdir --parents sorting-output/ceno | ||
mkdir --parents sorting-output/sp1 | ||
) | ||
|
||
( | ||
cd sorting/program | ||
cargo prove build | ||
) | ||
export MAX=12000 | ||
# export MAX="$((1 << 14))" | ||
|
||
for N in $(shuf --input-range=1-${MAX}); do | ||
for system in $(shuf --echo ceno sp1); do | ||
output="sorting-output/${N}-$(date --iso-8601=ns --utc)/${system}" | ||
mkdir --parents "${output}" | ||
./run_${system}_sorting "${N}" "${output}" | ||
|
||
done | ||
|
||
done | ||
|
||
output="output_time" | ||
|
||
( | ||
cd sorting/script | ||
|
||
# export RUSTFLAGS="-C target-cpu=native -C target-feature=+avx512f" | ||
# export RUSTFLAGS="-C target-cpu=native" | ||
export RUST_LOG=info | ||
# cargo clean | ||
cargo build --release --bin sorting | ||
/usr/bin/time --verbose --output="${output}" -- cargo run --release -- --n=$N --prove | ||
echo "RUSTFLAGS=\'${RUSTFLAGS:-}\'" | ||
echo "N=\'${N}'" | ||
cat "${output}" | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,28 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
export N=$((1<<10)) | ||
output="output_time" | ||
|
||
N="$1" | ||
|
||
# We assume that "${output_dir}" exists. | ||
export output_dir="$2" | ||
test -d "${output_dir}" | ||
|
||
output_time="$(realpath "${output_dir}/output_time")" | ||
output_log="$(realpath "${output_dir}/log")" | ||
|
||
( | ||
cd sorting/program | ||
cargo prove build | ||
) | ||
( | ||
cd sorting/script | ||
|
||
# export RUSTFLAGS="-C target-cpu=native -C target-feature=+avx512f" | ||
# export RUSTFLAGS="-C target-cpu=native" | ||
if grep --silent avx512 /proc/cpuinfo; then | ||
export RUSTFLAGS="-C target-cpu=native -C target-feature=+avx512f" | ||
else | ||
export RUSTFLAGS="-C target-cpu=native" | ||
fi | ||
export RUST_LOG=info | ||
# cargo clean | ||
cargo build --release --bin sorting | ||
/usr/bin/time --verbose --output="${output}" -- cargo run --release -- --n=$N --prove | ||
echo "RUSTFLAGS=\'${RUSTFLAGS:-}\'" | ||
echo "N=\'${N}'" | ||
cat "${output}" | ||
/usr/bin/time --verbose --output="${output_time}" -- cargo run --release -- --n="${N}" --prove | tee "${output_log}" | ||
) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
[workspace] | ||
members = [ | ||
"lib", | ||
"program", | ||
"script", | ||
] | ||
resolver = "2" | ||
|
||
[workspace.dependencies] | ||
alloy-sol-types = "0.7.7" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
File renamed without changes.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Command being timed: "cargo run --release -- --n=1024 --prove" | ||
User time (seconds): 200.32 | ||
System time (seconds): 4.19 | ||
Percent of CPU this job got: 1904% | ||
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:10.73 | ||
Average shared text size (kbytes): 0 | ||
Average unshared data size (kbytes): 0 | ||
Average stack size (kbytes): 0 | ||
Average total size (kbytes): 0 | ||
Maximum resident set size (kbytes): 4958420 | ||
Average resident set size (kbytes): 0 | ||
Major (requiring I/O) page faults: 0 | ||
Minor (reclaiming a frame) page faults: 256198 | ||
Voluntary context switches: 188637 | ||
Involuntary context switches: 188596 | ||
Swaps: 0 | ||
File system inputs: 0 | ||
File system outputs: 0 | ||
Socket messages sent: 0 | ||
Socket messages received: 0 | ||
Signals delivered: 0 | ||
Page size (bytes): 4096 | ||
Exit status: 0 |
This file was deleted.
Oops, something went wrong.
This file contains 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