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

fix: starky docs #244

Merged
merged 4 commits into from
Apr 21, 2024
Merged
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
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
Loading