-
Notifications
You must be signed in to change notification settings - Fork 35
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
feat(msm-gpu-exploration): integrate zprize msm #128
Conversation
…chmarking at once
…x 10 benchmark data can be gen in 5 min
ace73e7
to
66b0ae2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one!
Left some minor comments above.
Could we add links to hackmds from gpu_explorations folder README.md? Just for people exploring this randomly to see context
Cargo.toml
Outdated
@@ -7,3 +7,10 @@ exclude = ["mopro-cli-example"] | |||
# NOTE: Forked wasmer to work around memory limits | |||
# See https://github.com/wasmerio/wasmer/commit/09c7070 | |||
wasmer = { git = "https://github.com/oskarth/wasmer.git", rev = "09c7070" } | |||
|
|||
# NOTE: For gpu exploration on zprize works |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put all of these under the gpu explorations feature flag perhaps? As optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added optional = true
for the patch in commits fc0c972, which will only be included when --features=gpu-benchmarks
is activated.
@@ -921,6 +921,15 @@ public func add(a: UInt32, b: UInt32) -> UInt32 { | |||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI we will probably get rid of mopro-ios and use mopro-cli - perhaps we can initialize a new project with mopro-cli
and put in examples/templates?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds great! we will start this template ASAP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So ideally the whole swift test app will use mopro-cli
and in examples/templates?
@oskarth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes! we have the basic template for simple apps, but benchmarks should probably be separate, can init with mopro-cli init
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @oskarth, maybe we will create one after this PR since we have to import the msm functions from this PR
Hi @oskarth
I think add a |
iOS CI failing, not sure why |
6639bd1
to
c1243e0
Compare
… now test_ios shoud success
c1243e0
to
7103cc5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI tests have passed for now (arkworks pippenger in 0.4 version and TrapdoorTech's work in zprize 2022). We're going to do more benchmarks on other MSM algorithms such as icicle and halo2curves implementation on the CPU.
// let pointUrl = URL(string: "https://mopro-msm.s3.eu-north-1.amazonaws.com/vectors/16x10/points") | ||
// let scalarUrl = URL(string: "https://mopro-msm.s3.eu-north-1.amazonaws.com/vectors/16x10/scalars") | ||
// func runDownloadAction() { | ||
// let pointStart = CFAbsoluteTimeGetCurrent() | ||
// FileDownloader.loadFileAsync(url: self.pointUrl!) { (path, error) in | ||
// print("Points File downloaded to : \(path!)") | ||
// let pointEnd = CFAbsoluteTimeGetCurrent() | ||
// print("Download points took:", pointEnd - pointStart, "s") | ||
// } | ||
|
||
// let scalarStart = CFAbsoluteTimeGetCurrent() | ||
// FileDownloader.loadFileAsync(url: self.scalarUrl!) { (path, error) in | ||
// print("Scalars File downloaded to : \(path!)") | ||
// let scalarEnd = CFAbsoluteTimeGetCurrent() | ||
// print("Download scalars took:", scalarEnd - scalarStart, "s") | ||
// } | ||
|
||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can confirm that the benchmarking instances can always be generated on both iOS simulator and mobile device, we should consider removing these comments in the later PR.
Overall
@moven0831 and I integrated the work of TrapdoorTech in zprize into
mopro-core
,mopro-ffi
and run the benchmark on myiphone 14 pro
.And here is the result:
Result running on FoodChain's Iphone 14 pro
logging:
result screenshot:
arkworks
components they used were in version0.3
.arkworks
MSM algorithm (version:0.4
) has been modified and probably taken some of the awarded algorithm in zprize as references, so that is why runs faster than the old work as shown in the result.Report
related issue
#22