mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-09 20:56:47 +01:00
* Add bivariate-convolution * Add pair-wise convolution + tests + benches * Add take_cnv_pvec_[left/right] to Scratch & updated CHANGELOG.md * cross-base2k normalization with positive offset * clippy & fix CI doctest avx compile error * more streamlined bounds derivation for normalization * Working cross-base2k normalization with pos/neg offset * Update normalization API & tests * Add glwe tensoring test * Add relinearization + preliminary test * Fix GGLWEToGGSW key infos * Add (X,Y) convolution by const (1, Y) poly * Faster normalization test + add bench for cnv_by_const * Update changelog
73 lines
2.0 KiB
Rust
73 lines
2.0 KiB
Rust
use criterion::{Criterion, criterion_group, criterion_main};
|
|
|
|
#[cfg(not(all(
|
|
feature = "enable-avx",
|
|
target_arch = "x86_64",
|
|
target_feature = "avx2",
|
|
target_feature = "fma"
|
|
)))]
|
|
fn bench_vec_znx_add_cpu_avx_fft64(_c: &mut Criterion) {
|
|
eprintln!("Skipping: AVX IFft benchmark requires x86_64 + AVX2 + FMA");
|
|
}
|
|
|
|
#[cfg(all(
|
|
feature = "enable-avx",
|
|
target_arch = "x86_64",
|
|
target_feature = "avx2",
|
|
target_feature = "fma"
|
|
))]
|
|
fn bench_vec_znx_add_cpu_avx_fft64(c: &mut Criterion) {
|
|
use poulpy_cpu_avx::FFT64Avx;
|
|
poulpy_hal::reference::vec_znx::bench_vec_znx_add::<FFT64Avx>(c, "FFT64Avx");
|
|
}
|
|
|
|
#[cfg(not(all(
|
|
feature = "enable-avx",
|
|
target_arch = "x86_64",
|
|
target_feature = "avx2",
|
|
target_feature = "fma"
|
|
)))]
|
|
fn bench_vec_znx_normalize_inplace_cpu_avx_fft64(_c: &mut Criterion) {
|
|
eprintln!("Skipping: AVX IFft benchmark requires x86_64 + AVX2 + FMA");
|
|
}
|
|
|
|
#[cfg(all(
|
|
feature = "enable-avx",
|
|
target_arch = "x86_64",
|
|
target_feature = "avx2",
|
|
target_feature = "fma"
|
|
))]
|
|
fn bench_vec_znx_normalize_inplace_cpu_avx_fft64(c: &mut Criterion) {
|
|
use poulpy_cpu_avx::FFT64Avx;
|
|
poulpy_hal::reference::vec_znx::bench_vec_znx_normalize_inplace::<FFT64Avx>(c, "FFT64Avx");
|
|
}
|
|
|
|
#[cfg(not(all(
|
|
feature = "enable-avx",
|
|
target_arch = "x86_64",
|
|
target_feature = "avx2",
|
|
target_feature = "fma"
|
|
)))]
|
|
fn bench_vec_znx_automorphism_cpu_avx_fft64(_c: &mut Criterion) {
|
|
eprintln!("Skipping: AVX IFft benchmark requires x86_64 + AVX2 + FMA");
|
|
}
|
|
|
|
#[cfg(all(
|
|
feature = "enable-avx",
|
|
target_arch = "x86_64",
|
|
target_feature = "avx2",
|
|
target_feature = "fma"
|
|
))]
|
|
fn bench_vec_znx_automorphism_cpu_avx_fft64(c: &mut Criterion) {
|
|
use poulpy_cpu_avx::FFT64Avx;
|
|
poulpy_hal::reference::vec_znx::bench_vec_znx_automorphism::<FFT64Avx>(c, "FFT64Avx");
|
|
}
|
|
|
|
criterion_group!(
|
|
benches,
|
|
bench_vec_znx_add_cpu_avx_fft64,
|
|
bench_vec_znx_normalize_inplace_cpu_avx_fft64,
|
|
bench_vec_znx_automorphism_cpu_avx_fft64,
|
|
);
|
|
criterion_main!(benches);
|