Skip to content

Commit

Permalink
use avx256 by default (#109)
Browse files Browse the repository at this point in the history
* wip

* fix

* fix

* simplify

* system test

* fix

* Update m31.rs
  • Loading branch information
zhenfeizhang authored Sep 27, 2024
1 parent 3df9ca0 commit fb82b21
Show file tree
Hide file tree
Showing 22 changed files with 84 additions and 1,245 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ jobs:
feature: avx2
field: gf2ext128
- os: 7950x3d
feature: avx512
feature: avx512f
field: m31ext3
- os: 7950x3d
feature: avx512
feature: avx512f
field: fr
- os: 7950x3d
feature: avx512
feature: avx512f
field: gf2ext128
steps:
- uses: actions/checkout@v4
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ path = "src/utils.rs"
default = []
# default = [ "grinding" ]
grinding = []
avx256 = ["arith/avx256"]

[workspace]
members = ["arith", "bi-kzg"]
Expand Down
2 changes: 0 additions & 2 deletions arith/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@ harness = false
name = "ext_field"
harness = false

[features]
avx256 = []
4 changes: 0 additions & 4 deletions arith/benches/ext_field.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#[cfg(target_arch = "x86_64")]
use arith::GF2_128x8_256;
use arith::{ExtensionField, Field, GF2_128x8, M31Ext3, M31Ext3x16, GF2_128};
use ark_std::test_rng;
use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
Expand Down Expand Up @@ -156,8 +154,6 @@ fn ext_by_base_benchmark(c: &mut Criterion) {
bench_field::<M31Ext3x16>(c);
bench_field::<GF2_128>(c);
bench_field::<GF2_128x8>(c);
#[cfg(target_arch = "x86_64")]
bench_field::<GF2_128x8_256>(c);
}

criterion_group!(ext_by_base_benches, ext_by_base_benchmark);
Expand Down
6 changes: 0 additions & 6 deletions arith/benches/field.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// this module benchmarks the performance of different field operations

use arith::{Field, GF2_128x8, GF2x8, M31Ext3, M31Ext3x16, M31x16, GF2, GF2_128, M31};
#[cfg(target_arch = "x86_64")]
use arith::{GF2_128x8_256, M31x16_256};
use ark_std::test_rng;
use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
use halo2curves::bn256::Fr;
Expand Down Expand Up @@ -176,17 +174,13 @@ pub(crate) fn bench_field<F: Field>(c: &mut Criterion) {
fn criterion_benchmark(c: &mut Criterion) {
bench_field::<M31>(c);
bench_field::<M31x16>(c);
#[cfg(target_arch = "x86_64")]
bench_field::<M31x16_256>(c);
bench_field::<M31Ext3>(c);
bench_field::<M31Ext3x16>(c);
bench_field::<Fr>(c);
bench_field::<GF2>(c);
bench_field::<GF2x8>(c);
bench_field::<GF2_128>(c);
bench_field::<GF2_128x8>(c);
#[cfg(target_arch = "x86_64")]
bench_field::<GF2_128x8_256>(c);
}

criterion_group!(benches, criterion_benchmark);
Expand Down
4 changes: 0 additions & 4 deletions arith/src/extension_field.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
mod fr_ext;
// mod gf2_127;
mod gf2_128;
mod gf2_128x8;
mod m31_ext;
mod m31_ext3x16;
use crate::{Field, FieldSerde};

// pub use gf2_127::*;
pub use gf2_128::*;
pub use gf2_128x8::GF2_128x8;
#[cfg(target_arch = "x86_64")]
pub use gf2_128x8::GF2_128x8_256;
pub use m31_ext::M31Ext3;
pub use m31_ext3x16::M31Ext3x16;

Expand Down
9 changes: 0 additions & 9 deletions arith/src/extension_field/gf2_127.rs

This file was deleted.

Loading

0 comments on commit fb82b21

Please sign in to comment.