-
Notifications
You must be signed in to change notification settings - Fork 231
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
Showing
15 changed files
with
744 additions
and
1 deletion.
There are no files selected for viewing
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
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
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,63 @@ | ||
load( | ||
"//bazel:tachyon_cc.bzl", | ||
"tachyon_cc_binary", | ||
"tachyon_cc_library", | ||
) | ||
|
||
tachyon_cc_library( | ||
name = "fri_config", | ||
testonly = True, | ||
srcs = ["fri_config.cc"], | ||
hdrs = ["fri_config.h"], | ||
deps = [ | ||
"//benchmark:config", | ||
"//tachyon/base/console", | ||
"//tachyon/base/containers:container_util", | ||
], | ||
) | ||
|
||
tachyon_cc_library( | ||
name = "fri_runner", | ||
testonly = True, | ||
hdrs = ["fri_runner.h"], | ||
deps = [ | ||
":fri_config", | ||
"//benchmark:simple_reporter", | ||
"//tachyon/base/containers:container_util", | ||
"//tachyon/base/time", | ||
"//tachyon/c/math/matrix", | ||
"//tachyon/crypto/hashes/sponge/poseidon2:poseidon2_horizen_external_matrix", | ||
"//tachyon/math/matrix:matrix_types", | ||
], | ||
) | ||
|
||
tachyon_cc_binary( | ||
name = "fri_benchmark", | ||
testonly = True, | ||
srcs = ["fri_benchmark.cc"], | ||
deps = [ | ||
":fri_config", | ||
":fri_runner", | ||
"//benchmark:simple_reporter", | ||
"//benchmark/fri/plonky3", | ||
"//tachyon/base:profiler", | ||
"//tachyon/c/math/finite_fields/baby_bear", | ||
"//tachyon/crypto/challenger:duplex_challenger", | ||
"//tachyon/crypto/commitments/fri:fri_config", | ||
"//tachyon/crypto/commitments/fri:two_adic_fri", | ||
"//tachyon/crypto/commitments/fri:two_adic_multiplicative_coset", | ||
"//tachyon/crypto/commitments/merkle_tree/field_merkle_tree:extension_field_merkle_tree_mmcs", | ||
"//tachyon/crypto/commitments/merkle_tree/field_merkle_tree:field_merkle_tree_mmcs", | ||
"//tachyon/crypto/hashes/sponge:padding_free_sponge", | ||
"//tachyon/crypto/hashes/sponge:truncated_permutation", | ||
"//tachyon/crypto/hashes/sponge/poseidon2", | ||
"//tachyon/crypto/hashes/sponge/poseidon2:poseidon2_horizen_external_matrix", | ||
"//tachyon/math/finite_fields:packed_field_traits_forward", | ||
"//tachyon/math/finite_fields/baby_bear:baby_bear4", | ||
"//tachyon/math/finite_fields/baby_bear:packed_baby_bear4", | ||
"//tachyon/math/finite_fields/baby_bear:poseidon2", | ||
"//tachyon/math/matrix:matrix_types", | ||
"//tachyon/math/polynomials/univariate:radix2_evaluation_domain", | ||
"@com_google_absl//absl/strings", | ||
], | ||
) |
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,48 @@ | ||
# Fri PCS Benchmark | ||
|
||
## CPU | ||
|
||
```bash | ||
Run on 13th Gen Intel(R) Core(TM) i9-13900K (32 X 5500 MHz CPU s) | ||
CPU Caches: | ||
L1 Data 48 KiB (x16) | ||
L1 Instruction 32 KiB (x16) | ||
L2 Unified 2048 KiB (x16) | ||
L3 Unified 36864 KiB (x1) | ||
|
||
Run on Apple M3 Pro (12 X 4050 MHz) | ||
CPU Caches: | ||
L1 Data 64 KiB (x12) | ||
L1 Instruction 128 KiB (x12) | ||
L2 Unified 4096 KiB (x12) | ||
``` | ||
|
||
```shell | ||
bazel run -c opt --//:has_openmp --//:has_rtti --//:has_matplotlib //benchmark/fri:fri_benchmark -- -k 18 -k 19 -k 20 -k 21 -k 22 --batch_size 100 --input_num 4 --log_blowup 2 --vendor plonky3 --check_results | ||
``` | ||
|
||
## On Intel i9-13900K | ||
|
||
| Exponent | Tachyon | Plonky3 | | ||
| :------- | ----------- | -------- | | ||
| 18 | **2.27057** | 2.54643 | | ||
| 19 | **3.82310** | 5.18472 | | ||
| 20 | **6.57053** | 10.2886 | | ||
| 21 | **11.6738** | 20.8495 | | ||
| 22 | **23.3768** | 43.0323 | | ||
|
||
![image](/benchmark/fri/fri_benchmark_ubuntu_i9.png) | ||
|
||
## On Mac M3 Pro | ||
|
||
WARNING: On Mac M3, high degree tests are not feasible due to memory constraints. | ||
|
||
| Exponent | Tachyon | Plonky3 | | ||
| :------- | ------- | ------------ | | ||
| 18 | 3.68509 | **1.39107** | | ||
| 19 | 7.37079 | **2.76483** | | ||
| 20 | 14.9081 | **5.62375** | | ||
| 21 | 30.3153 | **11.8295** | | ||
| 22 | 64.8022 | **25.4490** | | ||
|
||
![image](/benchmark/fri/fri_benchmark_mac_m3.png) |
Oops, something went wrong.