File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
extension/benchmark/android/benchmark
app/src/main/java/org/pytorch/minibench Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,10 @@ phases:
109
109
- |
110
110
adb -s $DEVICEFARM_DEVICE_UDID shell am force-stop org.pytorch.minibench
111
111
112
+ adb -s $DEVICEFARM_DEVICE_UDID shell dumpsys deviceidle force-idle
113
+ adb -s $DEVICEFARM_DEVICE_UDID shell dumpsys deviceidle unforce
114
+ adb -s $DEVICEFARM_DEVICE_UDID shell sleep 10
115
+
112
116
if [ -n "$BIN_FOUND" ]; then
113
117
adb -s $DEVICEFARM_DEVICE_UDID shell am start -W -n org.pytorch.minibench/.LlmBenchmarkActivity \
114
118
--es "model_dir" "/data/local/tmp/minibench" \
Original file line number Diff line number Diff line change @@ -95,6 +95,12 @@ protected void onPostExecute(Void aVoid) {
95
95
new BenchmarkMetric (
96
96
benchmarkModel ,
97
97
"avg_inference_latency(ms)" ,
98
+ stats .latency .stream ().mapToDouble (l -> l ).average ().orElse (0.0f ),
99
+ 0.0f ));
100
+ results .add (
101
+ new BenchmarkMetric (
102
+ benchmarkModel ,
103
+ "trimmean_inference_latency(ms)" ,
98
104
usedLatencyResults .stream ().mapToDouble (l -> l ).average ().orElse (0.0f ),
99
105
0.0f ));
100
106
// Model load time
You can’t perform that action at this time.
0 commit comments