Commit d761f99
Add a mock perf test for llama2 on Android (#2963)
Summary:
I'm trying to setup a simple perf test when running llama2 on Android. It's naively sent a prompt and record the TPS. Open for comment about the test here before setting this up on CI.
### Testing
Copy the exported model and the tokenizer as usual, then cd to the app and run `./gradlew :app:connectAndroidTest`. The test will fail if the model is failed to load or if the TPS is lower than 7 as measure by https://github.com/pytorch/executorch/tree/main/examples/models/llama2
Pull Request resolved: #2963
Reviewed By: kirklandsign
Differential Revision: D55951637
Pulled By: huydhn
fbshipit-source-id: 34c189aefd7e31514fcf49103352ef3cf8e5b2c91 parent 2fc99b0 commit d761f99
File tree
1 file changed
+65
-0
lines changed- examples/demo-apps/android/LlamaDemo/app/src/androidTest/java/com/example/executorchllamademo
1 file changed
+65
-0
lines changedLines changed: 65 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
0 commit comments