We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54dccc9 commit f72c187Copy full SHA for f72c187
extension/benchmark/android/benchmark/app/src/main/java/org/pytorch/minibench/BenchmarkActivity.java
@@ -44,6 +44,7 @@ protected void onCreate(Bundle savedInstanceState) {
44
.get();
45
46
int numIter = intent.getIntExtra("num_iter", 50);
47
+ int numWarmupIter = intent.getIntExtra("num_warm_up_iter", 5);
48
49
// TODO: Format the string with a parsable format
50
Stats stats = new Stats();
@@ -58,6 +59,10 @@ protected Void doInBackground(Void... voids) {
58
59
stats.errorCode = module.loadMethod("forward");
60
stats.loadEnd = System.nanoTime();
61
62
+ for (int i = 0; i < numWarmupIter; i++) {
63
+ module.forward();
64
+ }
65
+
66
for (int i = 0; i < numIter; i++) {
67
long start = System.nanoTime();
68
module.forward();
0 commit comments