-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathtest.sh
executable file
·126 lines (98 loc) · 6.55 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/bin/bash
# Copyright Supranational LLC
set -e
set -x
# Cache files, assumed to be CC for the tests below. To generate, edit
# fil-proofs-tooling/src/bin/benchy/window_post.rs in rust-fil-proofs. Around
# line 129, change
# .map(|_| rand::random::<u8>())
# to
# .map(|_| 0x0)
#
# env RUST_LOG=trace FIL_PROOFS_USE_MULTICORE_SDR=1 FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1 FIL_PROOFS_USE_GPU_TREE_BUILDER=1 BELLMAN_CUSTOM_GPU="NVIDIA GeForce RTX 3090:10496" ./target/release/benchy window-post --size 512MiB --cache ./cache_benchy_run_512MiB 2>&1 | tee run_512m_0.log
# env RUST_LOG=trace FIL_PROOFS_USE_MULTICORE_SDR=1 FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1 FIL_PROOFS_USE_GPU_TREE_BUILDER=1 BELLMAN_CUSTOM_GPU="NVIDIA GeForce RTX 3090:10496" ./target/release/benchy window-post --size 32GiB --cache ./cache_benchy_run_32GiB 2>&1 | tee run_32g_0.log
cache_16KiB="../cache_benchy_run_16KiB"
cache_512MiB="../cache_benchy_run_512MiB"
cache_32GiB="../cache_benchy_run_32GiB"
# This cache is random data, not cc
cache_512MiB_rand="../cache_benchy_run_512MiB_rand"
test_dir="/var/tmp/supra_seal/test_tmp"
rm -fr $test_dir/*
./build.sh -r
echo "************************************************************"
echo "* 16KiB pc2"
echo "************************************************************"
mkdir -p $test_dir/pc2_test_16KiB
./bin/pc2 -i $cache_16KiB -o $test_dir/pc2_test_16KiB -b 16KiB
cmp $cache_16KiB/p_aux $test_dir/pc2_test_16KiB/p_aux
cmp $cache_16KiB/sc-02-data-tree-c-0.dat $test_dir/pc2_test_16KiB/sc-02-data-tree-c-0.dat
cmp $cache_16KiB/sc-02-data-tree-c-7.dat $test_dir/pc2_test_16KiB/sc-02-data-tree-c-7.dat
cmp $cache_16KiB/sc-02-data-tree-r-last-0.dat $test_dir/pc2_test_16KiB/sc-02-data-tree-r-last-0.dat
cmp $cache_16KiB/sc-02-data-tree-r-last-1.dat $test_dir/pc2_test_16KiB/sc-02-data-tree-r-last-1.dat
echo "************************************************************"
echo "* 512MiB pc2"
echo "************************************************************"
mkdir -p $test_dir/pc2_test_512MiB
./bin/pc2 -i $cache_512MiB -o $test_dir/pc2_test_512MiB -b 512MiB
cmp $cache_512MiB/p_aux $test_dir/pc2_test_512MiB/p_aux
cmp $cache_512MiB/sc-02-data-tree-c.dat $test_dir/pc2_test_512MiB/sc-02-data-tree-c.dat
cmp $cache_512MiB/sc-02-data-tree-r-last.dat $test_dir/pc2_test_512MiB/sc-02-data-tree-r-last.dat
cmp $cache_512MiB/sealed-file $test_dir/pc2_test_512MiB/sealed-file
echo "************************************************************"
echo "* 512MiB tree-r random"
echo "************************************************************"
mkdir -p $test_dir/tree-r_test_512MiB_rand
./bin/tree_r -l $cache_512MiB_rand/sc-02-data-layer-2.dat -d $cache_512MiB_rand/staged-file -o $test_dir/tree-r_test_512MiB_rand -b 512MiB
# Only the root of r is written to p_aux
cmp -i 32 ../cache_benchy_run_512MiB_rand/p_aux /var/tmp/supra_seal/test_tmp/tree-r_test_512MiB_rand/p_aux
cmp $cache_512MiB_rand/sc-02-data-tree-r-last.dat $test_dir/tree-r_test_512MiB_rand/sc-02-data-tree-r-last.dat
cmp $cache_512MiB_rand/sealed-file $test_dir/tree-r_test_512MiB_rand/sealed-file
echo "************************************************************"
echo "* 512MiB tree-r-cpu random"
echo "************************************************************"
mkdir -p $test_dir/tree-r-cpu_test_512MiB_rand
./bin/tree_r_cpu -l $cache_512MiB_rand/sc-02-data-layer-2.dat -d $cache_512MiB_rand/staged-file -o $test_dir/tree-r-cpu_test_512MiB_rand -b 512MiB
cmp $cache_512MiB_rand/sc-02-data-tree-r-last.dat $test_dir/tree-r-cpu_test_512MiB_rand/sc-02-data-tree-r-last.dat
cmp $cache_512MiB_rand/sealed-file $test_dir/tree-r-cpu_test_512MiB_rand/sealed-file
echo "************************************************************"
echo "* 32GiB pc2"
echo "************************************************************"
mkdir -p $test_dir/pc2_test_32GiB
./bin/pc2 -i $cache_32GiB -o $test_dir/pc2_test_32GiB -b 32GiB
cmp $cache_32GiB/p_aux $test_dir/pc2_test_32GiB/p_aux
cmp $cache_32GiB/sc-02-data-tree-c-0.dat $test_dir/pc2_test_32GiB/sc-02-data-tree-c-0.dat
cmp $cache_32GiB/sc-02-data-tree-c-7.dat $test_dir/pc2_test_32GiB/sc-02-data-tree-c-7.dat
cmp $cache_32GiB/sc-02-data-tree-r-last-0.dat $test_dir/pc2_test_32GiB/sc-02-data-tree-r-last-0.dat
cmp $cache_32GiB/sc-02-data-tree-r-last-1.dat $test_dir/pc2_test_32GiB/sc-02-data-tree-r-last-1.dat
cmp $cache_32GiB/sealed-file $test_dir/pc2_test_32GiB/sealed-file
echo "************************************************************"
echo "* 32GiB tree-r CC"
echo "************************************************************"
mkdir -p $test_dir/tree-r_test_32GiB
./bin/tree_r -l $cache_32GiB/sc-02-data-layer-11.dat -d $cache_32GiB/staged-file -o $test_dir/tree-r_test_32GiB -b 32GiB
# Only the root of r is written to p_aux
cmp -i 32 ../cache_benchy_run_32GiB/p_aux /var/tmp/supra_seal/test_tmp/tree-r_test_32GiB/p_aux
cmp $cache_32GiB/sc-02-data-tree-r-last-0.dat $test_dir/tree-r_test_32GiB/sc-02-data-tree-r-last-0.dat
cmp $cache_32GiB/sc-02-data-tree-r-last-1.dat $test_dir/tree-r_test_32GiB/sc-02-data-tree-r-last-1.dat
echo "************************************************************"
echo "* 32GiB tree-r-cpu"
echo "************************************************************"
mkdir -p $test_dir/tree-r-cpu_test_32GiB
./bin/tree_r_cpu -l $cache_32GiB/sc-02-data-layer-11.dat -d $cache_32GiB/staged-file -o $test_dir/tree-r-cpu_test_32GiB -b 32GiB
cmp $cache_32GiB/sc-02-data-tree-r-last-0.dat $test_dir/tree-r-cpu_test_32GiB/sc-02-data-tree-r-last-0.dat
cmp $cache_32GiB/sc-02-data-tree-r-last-1.dat $test_dir/tree-r-cpu_test_32GiB/sc-02-data-tree-r-last-1.dat
cmp $cache_32GiB/sc-02-data-tree-r-last-2.dat $test_dir/tree-r-cpu_test_32GiB/sc-02-data-tree-r-last-2.dat
cmp $cache_32GiB/sc-02-data-tree-r-last-3.dat $test_dir/tree-r-cpu_test_32GiB/sc-02-data-tree-r-last-3.dat
cmp $cache_32GiB/sc-02-data-tree-r-last-4.dat $test_dir/tree-r-cpu_test_32GiB/sc-02-data-tree-r-last-4.dat
cmp $cache_32GiB/sc-02-data-tree-r-last-5.dat $test_dir/tree-r-cpu_test_32GiB/sc-02-data-tree-r-last-5.dat
cmp $cache_32GiB/sc-02-data-tree-r-last-6.dat $test_dir/tree-r-cpu_test_32GiB/sc-02-data-tree-r-last-6.dat
cmp $cache_32GiB/sc-02-data-tree-r-last-7.dat $test_dir/tree-r-cpu_test_32GiB/sc-02-data-tree-r-last-7.dat
echo "************************************************************"
echo "* 32GiB c2"
echo "************************************************************"
cd demos/c2-test
cargo test --release --test c2 -- --nocapture
# echo "************************************************************"
# echo "* 512MiB sealing pipeline"
# echo "************************************************************"
# ./exec.sh 512MiB