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

jellyfish benches build break with --no-default-features #652

Open
ggutoski opened this issue Aug 13, 2024 · 3 comments
Open

jellyfish benches build break with --no-default-features #652

ggutoski opened this issue Aug 13, 2024 · 3 comments
Assignees

Comments

@ggutoski
Copy link
Contributor

I'm unable to build jellyfish benches with --no-default-features. The feature parallel is on by default so I cannot run benches without parallel feature. Much confusion. Why is parallelizable_slice_iter returning a rayon::slice::Iter when parallel feature is disabled?? I expect rayon to be completely absent without parallel.

cargo check --benches --no-default-features --features test-srs
    Checking jf-relation v0.4.4 (https://github.com/EspressoSystems/jellyfish?tag=0.4.5#7d71dbef)
    Checking jf-pcs v0.1.0 (/Users/gus/Documents/espresso/git-repos/jellyfish/pcs)
    Checking jf-relation v0.4.4 (/Users/gus/Documents/espresso/git-repos/jellyfish/relation)
error[E0599]: `rayon::slice::Iter<'_, DensePolynomial<<E as ark_ec::pairing::Pairing>::ScalarField>>` is not an iterator
   --> pcs/src/univariate_kzg/mod.rs:134:14
    |
133 |           let res = parallelizable_slice_iter(polys)
    |  ___________________-
134 | |             .map(|poly| Self::commit(prover_param, poly))
    | |             -^^^ `rayon::slice::Iter<'_, DensePolynomial<<E as ark_ec::pairing::Pairing>::ScalarField>>` is not an iterator
    | |_____________|
    | 
    |
   ::: /Users/gus/.cargo-nix/registry/src/index.crates.io-6f17d22bba15001f/rayon-1.10.0/src/slice/mod.rs:785:1
    |
785 |   pub struct Iter<'data, T: Sync> {
    |   ------------------------------- doesn't satisfy `_: Iterator`
    |
    = note: the following trait bounds were not satisfied:
            `rayon::slice::Iter<'_, DensePolynomial<<E as ark_ec::pairing::Pairing>::ScalarField>>: Iterator`
            which is required by `&mut rayon::slice::Iter<'_, DensePolynomial<<E as ark_ec::pairing::Pairing>::ScalarField>>: Iterator`
    = help: items from traits can only be used if the trait is in scope
help: trait `ParallelIterator` which provides `map` is implemented but not in scope; perhaps you want to import it
    |
9   + use rayon::iter::ParallelIterator;
    |

...and many more similar build errors.

@akonring
Copy link
Contributor

Well, this seems annoying.

I'm unable to build jellyfish benches with --no-default-features. The feature parallel is on by default so I cannot run benches without parallel feature. Much confusion. Why is parallelizable_slice_iter returning a rayon::slice::Iter when parallel feature is disabled?? I expect rayon to be completely absent without parallel.

fwiw, there exists rayon-cond here but not sure it is super helpful.

@alxiong
Copy link
Contributor

alxiong commented Aug 21, 2024

i'd suggest we use plonky2's maybe_rayon, could closes #111 as a plus.

@ggutoski
Copy link
Contributor Author

i'd suggest we use plonky2's maybe_rayon, could closes #111 as a plus.

omg yes! I'm not a huge fan of parallelizable_slice_iter tbh.

@philippecamacho philippecamacho added P-high High priority P-medium Medium priority jf-vid-prep-audit-benches and removed P-high High priority labels Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants