Skip to content

Commit c6b6bc5

Browse files
authoredApr 19, 2022
Add tid for execute function. (alibaba#896)
1 parent fa1e191 commit c6b6bc5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
 

‎ODLA/platforms/vodla/vODLA.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -899,9 +899,9 @@ odla_status odla_ExecuteComputation(odla_computation comp, odla_context context,
899899
.pad = 0,
900900
.time_used = 0,
901901
.output = NULL};
902+
pid_t tid = gettid();
902903

903904
#ifdef DEBUG
904-
pid_t tid = gettid();
905905
std::cout << "[vODLA] DEBUG: tid " << tid
906906
<< " odla_ExecuteComputation use opt addr " << &vodh_infer_opt
907907
<< "\nres addr " << &vodh_infer_res << std::endl;
@@ -990,11 +990,13 @@ odla_status odla_ExecuteComputation(odla_computation comp, odla_context context,
990990
xpu_time_avg += vodh_infer_res.time_used;
991991
}
992992
xpu_time_avg /= LOOP_CNT;
993-
std::cout << "[vODLA] TIMING: Remote xPU inference avg time: "
994-
<< xpu_time_avg << "us, max time: " << xpu_time_max
993+
std::cout << "[vODLA] TIMING: tid " << tid
994+
<< " Remote xPU inference avg time: " << xpu_time_avg
995+
<< "us, max time: " << xpu_time_max
995996
<< "us, min time: " << xpu_time_min << "us.\n";
996997
time_avg /= LOOP_CNT;
997-
std::cout << "[vODLA] TIMING: Inference avg time: " << time_avg << "us, "
998+
std::cout << "[vODLA] TIMING: tid " << tid
999+
<< "Inference avg time: " << time_avg << "us, "
9981000
<< "max time: " << time_max << " us,"
9991001
<< "min time: " << time_min << " us.\n";
10001002
std::cout << "[vODLA] TIMING: Inference avg throuput: "

0 commit comments

Comments
 (0)