mirror of
https://github.com/arnaucube/poulpy.git
synced 2026-02-10 05:06:44 +01:00
Update to non-avx builds
This commit is contained in:
@@ -8,10 +8,12 @@ use poulpy_core::{
|
||||
GLWESecretPreparedFactory, LWE, LWELayout, LWESecret,
|
||||
},
|
||||
};
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
use poulpy_cpu_avx::FFT64Avx;
|
||||
#[cfg(not(target_arch = "x86_64"))]
|
||||
use poulpy_cpu_ref::FFT64Ref;
|
||||
|
||||
#[cfg(all(feature = "enable-avx", target_arch = "x86_64"))]
|
||||
pub use poulpy_cpu_avx::FFT64Avx as BackendImpl;
|
||||
|
||||
#[cfg(not(all(feature = "enable-avx", target_arch = "x86_64")))]
|
||||
pub use poulpy_cpu_ref::FFT64Ref as BackendImpl;
|
||||
|
||||
use poulpy_hal::{
|
||||
api::{ModuleN, ModuleNew, ScratchOwnedAlloc, ScratchOwnedBorrow, VecZnxRotateInplace},
|
||||
@@ -130,7 +132,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
for params in [Params {
|
||||
let params: Params = Params {
|
||||
name: String::from("1-bit"),
|
||||
extension_factor: 1,
|
||||
k_pt: 1,
|
||||
@@ -174,27 +176,22 @@ where
|
||||
rank: 2_u32.into(),
|
||||
},
|
||||
},
|
||||
}] {
|
||||
let id: BenchmarkId = BenchmarkId::from_parameter(params.name.clone());
|
||||
let mut runner = runner::<BE, BRA>(¶ms);
|
||||
group.bench_with_input(id, &(), |b, _| b.iter(&mut runner));
|
||||
}
|
||||
};
|
||||
|
||||
let id: BenchmarkId = BenchmarkId::from_parameter(params.name.clone());
|
||||
let mut runner = runner::<BE, BRA>(¶ms);
|
||||
group.bench_with_input(id, &(), |b, _| b.iter(&mut runner));
|
||||
|
||||
group.finish();
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "x86_64"))]
|
||||
fn bench_circuit_bootstrapping_cpu_ref_fft64(c: &mut Criterion) {
|
||||
benc_circuit_bootstrapping::<FFT64Ref, CGGI>(c, "fft64_ref");
|
||||
fn bench_circuit_bootstrapping_fft64(c: &mut Criterion) {
|
||||
#[cfg(all(feature = "enable-avx", target_arch = "x86_64"))]
|
||||
let label = "fft64_avx";
|
||||
#[cfg(not(all(feature = "enable-avx", target_arch = "x86_64")))]
|
||||
let label = "fft64_ref";
|
||||
benc_circuit_bootstrapping::<BackendImpl, CGGI>(c, label);
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
fn bench_circuit_bootstrapping_cpu_avx_fft64(c: &mut Criterion) {
|
||||
benc_circuit_bootstrapping::<FFT64Avx, CGGI>(c, "fft64_avx");
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
criterion_group!(benches, bench_circuit_bootstrapping_cpu_ref_fft64, bench_circuit_bootstrapping_cpu_avx_fft64,);
|
||||
#[cfg(not(target_arch = "x86_64"))]
|
||||
criterion_group!(benches, bench_circuit_bootstrapping_cpu_ref_fft64,);
|
||||
criterion_group!(benches, bench_circuit_bootstrapping_fft64);
|
||||
criterion_main!(benches);
|
||||
|
||||
Reference in New Issue
Block a user