Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

fix bug in benchmark[developing] #461

Open
wants to merge 3 commits into
base: developing
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/framework/net/benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,15 @@ TEST(NetTest, net_execute_base_test) {
fill_tensor_host_const(th, 1.f);
d_tensor_in_p->copy_from(th);
}
cudaDeviceSynchronize();
// do inference
Context<Target> ctx(FLAGS_device_id, 0, 0);
saber::SaberTimer<Target> my_time;
LOG(WARNING) << "EXECUTER !!!!!!!! ";
for (int i = 0; i < FLAGS_warmup_iter; i++) {
net_executer.prediction();
}
cudaDeviceSynchronize();
#ifdef ENABLE_OP_TIMER
net_executer.reset_op_time();
#endif
Expand All @@ -126,7 +128,7 @@ TEST(NetTest, net_execute_base_test) {
}
my_time.end(ctx);
#ifdef ENABLE_OP_TIMER
std::vector<float> op_time = net_executer.geifrot_op_time();
std::vector<float> op_time = net_executer.get_op_time();
auto exec_funcs = net_executer.get_exec_funcs();
auto op_param = net_executer.get_op_param();
for (int i = 0; i < op_time.size(); i++) {
Expand Down