Skip to content

Commit 1695972

Browse files
authored
fix: Undo perf_runner changes (#727)
1 parent 3238a90 commit 1695972

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

onnxruntime/test/perftest/performance_runner.cc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,8 @@ Status PerformanceRunner::RunParallelDuration() {
203203
counter++;
204204
tpool->Schedule([this, &counter, &m, &cv]() {
205205
auto status = RunOneIteration<false>();
206-
if (!status.IsOK()) {
206+
if (!status.IsOK())
207207
std::cerr << status.ErrorMessage();
208-
}
209208
// Simplified version of Eigen::Barrier
210209
std::lock_guard<std::mutex> lg(m);
211210
counter--;
@@ -217,11 +216,8 @@ Status PerformanceRunner::RunParallelDuration() {
217216
} while (duration_seconds.count() < performance_test_config_.run_config.duration_in_seconds);
218217

219218
// Join
220-
tpool->Schedule([this, &counter, &m, &cv]() {
221-
ORT_UNUSED_PARAMETER(this);
222-
std::unique_lock<std::mutex> lock(m);
223-
cv.wait(lock, [&counter]() { return counter == 0; });
224-
});
219+
std::unique_lock<std::mutex> lock(m);
220+
cv.wait(lock, [&counter]() { return counter == 0; });
225221

226222
return Status::OK();
227223
}

0 commit comments

Comments
 (0)