Skip to content

Commit 5c3439d

Browse files
Guang Yangfacebook-github-bot
authored andcommitted
Increase number of iterations for benchmarking (#6209)
Summary: Tweak on the iterations for the non-genai models Pull Request resolved: #6209 Reviewed By: huydhn, shoumikhin, kirklandsign Differential Revision: D64367752 Pulled By: guangy10 fbshipit-source-id: 26084631c0c7a0cd71a93cb8e542e16f2cf7a336
1 parent 6108a0b commit 5c3439d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

extension/benchmark/android/benchmark/app/src/main/java/org/pytorch/minibench/BenchmarkActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected void onCreate(Bundle savedInstanceState) {
4242
.findFirst()
4343
.get();
4444

45-
int numIter = intent.getIntExtra("num_iter", 10);
45+
int numIter = intent.getIntExtra("num_iter", 50);
4646

4747
// TODO: Format the string with a parsable format
4848
Stats stats = new Stats();

extension/benchmark/apple/Benchmark/Tests/GenericTests.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ @implementation GenericTests
8585
XCTFail("Unsupported tag %i at input %d", *input_tag, index);
8686
}
8787
}
88+
XCTMeasureOptions *options = [[XCTMeasureOptions alloc] init];
89+
options.iterationCount = 20;
8890
[testCase measureWithMetrics:@[ [XCTClockMetric new], [XCTMemoryMetric new] ]
91+
options:options
8992
block:^{
9093
XCTAssertEqual(module->forward().error(), Error::Ok);
9194
}];

0 commit comments

Comments
 (0)