Skip to content
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

FFT bench print CPU info #870

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ starknet-crypto = "0.6.2"
starknet-ff = "0.3.7"
thiserror.workspace = true
tracing.workspace = true
sysinfo = "0.32.0"
rayon = { version = "1.10.0", optional = true }
serde = { version = "1.0", features = ["derive"] }

Expand Down
15 changes: 15 additions & 0 deletions crates/prover/benches/fft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,18 @@ use stwo_prover::core::backend::simd::fft::transpose_vecs;
use stwo_prover::core::backend::simd::m31::PackedBaseField;
use stwo_prover::core::fields::m31::BaseField;
use stwo_prover::core::poly::circle::CanonicCoset;
use sysinfo::System;

pub fn simd_ifft(c: &mut Criterion) {
let mut group = c.benchmark_group("iffts");
println!("Running ifft benches!!");
let mut sys = System::new_all();
sys.refresh_all();

let cpus = sys.cpus();
for (i, cpu) in cpus.iter().enumerate() {
println!("CPU {}: {}", i, cpu.brand());
}
for log_size in 16..=28 {
let domain = CanonicCoset::new(log_size).circle_domain();
let twiddle_dbls = get_itwiddle_dbls(domain.half_coset);
Expand Down Expand Up @@ -102,7 +110,14 @@ pub fn simd_ifft_parts(c: &mut Criterion) {

pub fn simd_rfft(c: &mut Criterion) {
const LOG_SIZE: u32 = 20;
println!("Running rfft benches!!");
let mut sys = System::new_all();
sys.refresh_all();

let cpus = sys.cpus();
for (i, cpu) in cpus.iter().enumerate() {
println!("CPU {}: {}", i, cpu.brand());
}
let domain = CanonicCoset::new(LOG_SIZE).circle_domain();
let twiddle_dbls = get_twiddle_dbls(domain.half_coset);
let twiddle_dbls_refs = twiddle_dbls.iter().map(|x| x.as_slice()).collect_vec();
Expand Down
Loading