https://github.com/zkmopro/gpu-acceleration
https://github.com/zkmopro/gpu-acceleration
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zkmopro/gpu-acceleration
- Owner: zkmopro
- License: apache-2.0
- Created: 2024-07-02T06:50:10.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-10T09:59:11.000Z (about 1 year ago)
- Last Synced: 2025-04-11T18:23:43.541Z (about 1 year ago)
- Language: Rust
- Size: 5.15 MB
- Stars: 18
- Watchers: 3
- Forks: 9
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- awesome-client-side-gpu - zkmopro/gpu-acceleration - Metal MSM library for Apple Silicon achieving 40–100× speedup over CPU, integrated into the mopro toolkit. `GPU: Metal` `Curve: BN254` `Op: MSM` `Lang: Rust`. (Projects by GPU Technology / Metal (Apple Silicon / iOS / macOS))
README
# mopro msm gpu-acceleration
We are researching and implementing methods to accelerate multi-scalar multiplication (MSM) on IOS mobile device.
## mopro-msm
This is a of various implementations of MSM functions, which are then integrated in `mopro-core`.
### Run benchmark on the laptop
Currently we support these MSM algorithms on BN254:
- arkworks_pippenger
- bucket_wise_msm
- precompute_msm
- metal::msm (GPU)
Replace `MSM_ALGO` with one of the algorithms above to get the corresponding benchmarks.
Benchmarking for single instance size:
```sh
cargo test --release --package mopro-msm --lib -- msm::MSM_ALGO::tests::test_run_benchmark --exact --nocapture
```
Benchmarking for multiple instance size:
```sh
cargo test --release --package mopro-msm --lib -- msm::MSM_ALGO::tests::test_run_multi_benchmarks --exact --nocapture
```
## gpu-exploration-app
This is a benchmark app to compare the performance of different algorithms on iOS device.
You can run the following commands in the root directory of the project to compile the metal library for a given OS:
```sh
# for macOS
bash mopro-msm/src/msm/metal/compile_metal.sh
# for iphoneOS
bash mopro-msm/src/msm/metal/compile_metal_iphone.sh
```