Skip to content

Commit

Permalink
fix: starky docs (#244)
Browse files Browse the repository at this point in the history
* fix: missing feature

* fix: docs
  • Loading branch information
eigmax authored Apr 21, 2024
1 parent 86a3668 commit 1fbe836
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 27 deletions.
1 change: 0 additions & 1 deletion fields/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![cfg_attr(feature = "avx512", feature(stdarch_x86_avx512))]
//#![cfg_attr(feature = "avx512", feature(stdsimd))]
extern crate rand;

pub mod arch;
Expand Down
21 changes: 3 additions & 18 deletions starky/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,6 @@ Merkelization calculates the Merkel proof of a polynomial, where the leaf nodes
|24|79| 66.01 |49.9154 |


* Polynomial evaluation

The evaluation is to calculate by:

```
let acc = 0n; // zero on GF(2^3)
let v be the point to evaluate;
let l be the coefficient vector of the polynomial;
for (let k=0; k<2^nExtBits; k++) {
acc = F.add(acc, F.mul(v, l[k]));
}
```

Because the nExtBits reaches up to 24 so this step would be very slow. Consider importing parallel fold from Rayon.

## Optimization

* reimpl pil-stark by Rust
Expand All @@ -93,17 +77,18 @@ Because the nExtBits reaches up to 24 so this step would be very slow. Consider
- [x] Codegen (arithmetization)
- [x] Verification hash type
> - [x] BN128
> - [x] BLS12381
> - [x] GL(F64)
- [x] Parallel reduce for polynomial evaluation
- [x] Recursive FRI
- [x] Poseidon Hash on GPU/Multicore for BN128
- [x] Poseidon Hash on GPU/Multicore for BN128/BLS12381

## Profiling

```
cargo bench --bench merklehash -- --profile-time=5
# or with AVX enabled like this
# or with AVX enabled like this
RUSTFLAGS='-C target-feature=+avx512f,+avx512bw,+avx512cd,+avx512dq,+avx512vl' cargo bench --features avx512 -- merklehash
RUSTFLAGS="-C target-feature=+avx2" cargo bench -- merklehash
Expand Down
4 changes: 0 additions & 4 deletions starky/src/arch/x86_64/avx2_poseidon_gl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,6 @@ impl Poseidon {
#[cfg(test)]
mod tests {
use crate::arch::x86_64::avx2_poseidon_gl::*;
use algebraic::arch::x86_64::avx2_field_gl::Avx2GoldilocksField;
use algebraic::packed::PackedField;
use plonky::field_gl::Fr as FGL;
use plonky::PrimeField;
use std::time::{Duration, Instant};

#[test]
Expand Down
4 changes: 0 additions & 4 deletions starky/src/arch/x86_64/avx512_poseidon_gl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,6 @@ impl Poseidon {
#[cfg(test)]
mod tests {
use crate::arch::x86_64::avx512_poseidon_gl::*;
use algebraic::arch::x86_64::avx512_field_gl::Avx512GoldilocksField;
use algebraic::packed::PackedField;
use fields::PrimeField;
use plonky::field_gl::Fr as FGL;
use std::time::{Duration, Instant};

#[test]
Expand Down

0 comments on commit 1fbe836

Please sign in to comment.