Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 783c15f

Browse files
committed
[Benchmarking CPP] Minor changes
- Change number of warmup and benchmarking iterations - Log benchmark progress Signed-off-by: Meenakshi Venkataraman <[email protected]>
1 parent 753a731 commit 783c15f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tftrt/benchmarking-cpp/main.cc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ int main(int argc, char* argv[]) {
141141
string model_path = "/path/to/model/";
142142
string signature_key = "serving_default";
143143
int32_t batch_size = 64;
144-
int32_t warmup_iters = 50;
145-
int32_t eval_iters = 1000;
144+
int32_t warmup_iters = 200;
145+
int32_t eval_iters = 800;
146146
bool input_from_device = true;
147147
bool output_to_host = true;
148148
std::vector<Flag> flag_list = {
@@ -212,6 +212,10 @@ int main(int argc, char* argv[]) {
212212
TFTRT_ENSURE_OK(device->Sync());
213213
end_time = std::chrono::steady_clock::now();
214214

215+
if ((i % 10) == 0) {
216+
LOG(INFO) << "step: " << i;
217+
}
218+
215219
double duration = (end_time - start_time).count() / 1e6;
216220
infer_time.push_back(duration);
217221
}
@@ -233,4 +237,4 @@ int main(int argc, char* argv[]) {
233237
LOG(INFO) << "Engine build time + first inference latency (ms): " << infer_time.front();
234238

235239
return 0;
236-
}
240+
}

0 commit comments

Comments
 (0)