supranational / pasta-msm Goto Github PK
View Code? Open in Web Editor NEWHigh-performance Multi-scalar Multiplication for Pasta curves
License: Apache License 2.0
High-performance Multi-scalar Multiplication for Pasta curves
License: Apache License 2.0
Hi! When I ran cargo bench
, I met an error: failed to run custom build command for sppark v0.1.5
. (Sorry, I am a beginner in Rust.) Does that mean my CUDA version is too low? How can I solve this problem if I don't have permission to upgrade CUDA?
I am looking forward to hearing back from you. Thank you very much!
Compiling pasta-msm v0.1.4 (/home/lq/project/pasta-msm)
error: failed to run custom build command for `sppark v0.1.5`
Caused by:
process didn't exit successfully: `/home/lq/project/pasta-msm/target/release/build/sppark-e4c8a9a15b3da435/build-script-build` (exit status: 101)
--- stdout
cargo:ROOT=/home/lq/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sppark-0.1.5/sppark
--- stderr
thread 'main' panicked at /home/lq/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sppark-0.1.5/build.rs:67:13:
Unsupported CUDA version 10.1 < 11.4
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
"Can the Pasta-msm library be used with other curves like bls12-381 or bls12-377?"
Benches also present this issue, but see tests (observed with rustc 1.72.0-nightly (2d0aa5768 2023-06-18)):
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
--> src/tests.rs:81:29
|
81 | / ... *(&ret[work] as *const pallas::Scalar
82 | | ... as *mut pallas::Scalar) =
| |_________________________________________________^
|
= note: `#[deny(cast_ref_to_mut)]` on by default
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
--> src/tests.rs:119:25
|
119 | / *(&rets[tid.fetch_add(1, Ordering::Relaxed)]
120 | | as *const pallas::Point
121 | | as *mut pallas::Point) = ret
| |__________________________________________________^
error: could not compile `pasta-msm` (lib test) due to 2 previous errors
It looks like semolina only supports x86_64 and aarch64, but semolina usage is optional? I have had mixed results compiling pasta-msm/semolina to wasm32-unknown-unknown
, and would like to clarify if it's a supported target. Thanks!
76db1fb introduced a change to the Cargo.toml
that allows using this crate with pasta_curves
at version 0.5.0.
To benefit from this change, one could depend on the master branch of the present crate, but that would constitute a moving target, as any new commit could introduce an incompatibility. A new crate release would allow pinning the version of pasta-msm we depend on.
Removed 826 files, 290.3MiB total
huitseeker@sleipnir➜huitseeker/tmp/pasta-msm(main)» git rev-parse HEAD [9:01:26]
994b68e8444f0c5cf44cf905fc908b55b1069d90
huitseeker@sleipnir➜huitseeker/tmp/pasta-msm(main)» cargo test [9:01:35]
Compiling libc v0.2.137
Compiling autocfg v1.1.0
Compiling cfg-if v1.0.0
Compiling either v1.8.0
Compiling cc v1.0.74
Compiling crossbeam-utils v0.8.12
Compiling serde v1.0.147
Compiling radium v0.7.0
Compiling memchr v2.5.0
Compiling proc-macro2 v1.0.47
Compiling tap v1.0.1
Compiling lazy_static v1.4.0
Compiling funty v2.0.0
Compiling quote v1.0.21
Compiling scopeguard v1.1.0
Compiling unicode-ident v1.0.5
Compiling rayon-core v1.9.3
Compiling ppv-lite86 v0.2.16
Compiling ryu v1.0.11
Compiling subtle v2.4.1
Compiling syn v1.0.103
Compiling serde_json v1.0.87
Compiling arrayref v0.3.6
Compiling constant_time_eq v0.1.5
Compiling serde_derive v1.0.147
Compiling arrayvec v0.7.2
Compiling itoa v1.0.4
Compiling unicode-width v0.1.10
Compiling plotters-backend v0.3.4
Compiling regex-automata v0.1.10
Compiling same-file v1.0.6
Compiling itoa v0.4.8
Compiling half v1.8.2
Compiling static_assertions v1.1.0
Compiling bitflags v1.3.2
Compiling regex-syntax v0.6.27
Compiling cast v0.3.0
Compiling oorandom v11.1.3
Compiling wyz v0.5.0
Compiling itertools v0.10.5
Compiling memoffset v0.6.5
Compiling crossbeam-epoch v0.9.11
Compiling num-traits v0.2.15
Compiling rayon v1.5.3
Compiling walkdir v2.3.2
Compiling textwrap v0.11.0
Compiling plotters-svg v0.3.3
Compiling blake2b_simd v1.0.0
Compiling semolina v0.1.4
Compiling bitvec v1.0.1
Compiling clap v2.34.0
Compiling crossbeam-channel v0.5.6
Compiling csv-core v0.1.10
Compiling getrandom v0.2.8
Compiling which v4.3.0
Compiling num_cpus v1.13.1
Compiling atty v0.2.14
Compiling criterion-plot v0.4.5
error[E0635]: unknown feature `proc_macro_span_shrink`
--> /home/huitseeker/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.47/src/lib.rs:92:30
|
92 | feature(proc_macro_span, proc_macro_span_shrink)
| ^^^^^^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0635`.
error: could not compile `proc-macro2` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Proc-macro2 removed the use of that feature in version 1.0.60.
v1.0.47 is imported here through criterion. The fix seems to be upgrading criterion & serde:
huitseeker@sleipnir➜huitseeker/tmp/pasta-msm(main)» cargo tree -p proc-macro2 -i [9:01:38]
proc-macro2 v1.0.47
├── quote v1.0.21
│ ├── serde_derive v1.0.147 (proc-macro)
│ │ └── criterion v0.3.6
│ │ [dev-dependencies]
│ │ └── pasta-msm v0.1.4 (/home/huitseeker/tmp/pasta-msm)
│ └── syn v1.0.103
│ └── serde_derive v1.0.147 (proc-macro) (*)
├── serde_derive v1.0.147 (proc-macro) (*)
└── syn v1.0.103 (*)
I got this error trying to run all the tests in my codebase using this MSM implementation.
I'm trying to reproduce, and get more information. Not sure how to investigate this one atm.
EDIT: I'm on mac (Intel) btw
EDIT: I could trigger the bug twice, at the same spot when running the tests, and now I can't trigger it anymore. It seems to be flaky (a mutex bug somewhere in this impl?)
Hi, since a few days (maybe a week) I can't compile pasta-msm
(and anything that depends on it). The error I get is while compiling semolina
: https://gist.github.com/leonardoalt/79f2984dcd6cead9942deebba1334e22, likely related to supranational/semolina#1. Semolina itself compiles fine in isolation, but fails when imported by pasta-msm.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.