zkmopro / mopro

Making client-side proving on mobile simple.
https://zkmopro.org
Apache License 2.0
131 stars 35 forks source link

Feat/Msm with gpu (metal shader language) on laptop #150

Closed FoodChain1028 closed 5 months ago

FoodChain1028 commented 6 months ago

The result of metal_msm that runs 2^10 (1024) randomly-chosen points and scalars:

Run metal msm benchmarking
    ```bash
    cargo test --release --package mopro-core --lib -- middleware::gpu_explorations::metal::msm::tests::test_benchmark_msm --exact --nocapture
Result:
```
Average time to execute MSM with 1024 points and scalars in 1 iterations is: 7.059988125s
Average time to execute MSM with 1024 points and scalars in 1 iterations is: 7.037813333s
Average time to execute MSM with 1024 points and scalars in 1 iterations is: 6.948694125s
Average time to execute MSM with 1024 points and scalars in 1 iterations is: 6.983621s
Average time to execute MSM with 1024 points and scalars in 1 iterations is: 7.005291583s
Average time to execute MSM with 1024 points and scalars in 1 iterations is: 7.019227875s
Average time to execute MSM with 1024 points and scalars in 1 iterations is: 7.026516125s
Average time to execute MSM with 1024 points and scalars in 1 iterations is: 7.037779959s
test middleware::gpu_explorations::metal::msm::tests::test_benchmark_msm has been running for over 60 seconds
Average time to execute MSM with 1024 points and scalars in 1 iterations is: 7.017979667s
Average time to execute MSM with 1024 points and scalars in 1 iterations is: 7.042247291s
Done running benchmark: Ok([7.059988125s, 7.037813333s, 6.948694125s, 6.983621s, 7.005291583s, 7.019227875s, 7.026516125s, 7.037779959s, 7.017979667s, 7.042247291s])
test middleware::gpu_explorations::metal::msm::tests::test_benchmark_msm ... ok
```
cloudflare-workers-and-pages[bot] commented 6 months ago

Deploying mopro with  Cloudflare Pages  Cloudflare Pages

Latest commit: e99f439
Status: ✅  Deploy successful!
Preview URL: https://7b727b4d.mopro.pages.dev
Branch Preview URL: https://feat-msm-with-gpu-on-laptop.mopro.pages.dev

View logs

moven0831 commented 5 months ago

Hi, @vivianjeng I've rebased to main and adapted changes from the code reviews above. After the review from @FoodChain1028 , we can consider to merge it back to main.