-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: modified metal to ios lib and change name
- Loading branch information
1 parent
ff195cb
commit 20fb4e9
Showing
32 changed files
with
161 additions
and
301 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# GPU Acceleration App | ||
|
||
This is an example for GPU accelerating exploration and a test for benchmarking results for different implemented msm functions, which might also focus on different parts of operations in SNARKs. | ||
|
||
## Usage | ||
|
||
Clone this repo then run either | ||
|
||
``` | ||
# CONFIGURATION is either debug or release | ||
CONFIGURATION=release cargo run --bin ios | ||
CONFIGURATION=debug cargo run --bin ios | ||
``` | ||
|
||
### running Benchmarks on IOS devices | ||
|
||
1. Make sure you are in `./mopro-msm/gpu-acceleartion-app/`. | ||
2. Run `CONFIGURATION=release cargo run --bin ios` for release building. | ||
|
||
|
||
The result would be like: | ||
|
||
![benchmark result on simulator](image/simulator_benchmark_result.png) |
File renamed without changes.
File renamed without changes.
40 changes: 40 additions & 0 deletions
40
gpu-acceleration-app/ios/gpu-acceleration-UITests/gpu_acceleration_UITests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import XCTest | ||
@testable import gpu_acceleration | ||
|
||
class MSMBenchmarkViewUITests: XCTestCase { | ||
|
||
var app: XCUIApplication! | ||
|
||
override func setUpWithError() throws { | ||
continueAfterFailure = false | ||
app = XCUIApplication() | ||
app.launch() | ||
} | ||
|
||
func testMSMBenchmarkViewUI() throws { | ||
// Navigate to MSMBenchmarkView | ||
app.buttons["Generate Benchmarks"].tap() | ||
|
||
// Check if the navigation title is correct | ||
XCTAssertTrue(app.navigationBars["MSM Benchmark"].exists) | ||
|
||
// Check if both algorithms are listed | ||
XCTAssertTrue(app.staticTexts["1. Arkwork (Baseline)"].exists) | ||
XCTAssertTrue(app.staticTexts["2. Metal (GPU)"].exists) | ||
|
||
// Check if the "Generate Benchmarks" button exists | ||
XCTAssertTrue(app.buttons["Generate Benchmarks"].exists) | ||
|
||
// Check if the results section exists | ||
XCTAssertTrue(app.staticTexts["BENCHMARK RESULTS"].exists) | ||
|
||
// Tap on the Metal (GPU) algorithm to select it | ||
app.staticTexts["2. Metal (GPU)"].tap() | ||
|
||
// Verify that both algorithms are now selected (checkmarks exist) | ||
XCTAssertEqual(app.images.matching(identifier: "checkmark").count, 2) | ||
|
||
// Tap the "Generate Benchmarks" button | ||
app.buttons["Generate Benchmarks"].tap() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...eleration-app/ios/gpu-acceleration.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.