Example and reference testing harness for the "Accelerating MSM on GPU" challenge in ZPrize 2022.
The CUDA sppark
from Supranational has a Rust binding. To install the latest version of Rust, first install rustup by following the instructions here, or via your platform's package manager. Once rustup is installed, install the Rust toolchain by invoking:
rustup install stable
After that, use cargo, the standard Rust build tool, to build the libraries:
git clone https://github.com/yelhousni/zprize-GPU-MSM-harness.git
cd zprize-GPU-MSM-harness
cargo build --release
To run a test of an MSM of 2^15
random points and scalars on the BLS12-377 curve, run:
cargo test --release
This repository specifies default features corresponding to the zprize competition. To run the targer benchmark of the competition (2^26
random points on BLS12-377), run:
cargo bench
To specify the window size in the Pippenger algorithm, pass the flag CXXFLAGS="-D WBITS=17"
. For BLS12-377, a window of size 17 seems to give the best results but it is up to competitors to specify it.