Skip to content

Commit 8e3e65f

Browse files
authored
Merge pull request #10526 from panyx0718/infer_profile2
allow inference test to generate timeline
2 parents eb7d875 + f093a7b commit 8e3e65f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

paddle/fluid/inference/tests/test_helper.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void TestInference(const std::string& dirname,
149149
state = paddle::platform::ProfilerState::kCPU;
150150
} else {
151151
#ifdef PADDLE_WITH_CUDA
152-
state = paddle::platform::ProfilerState::kCUDA;
152+
state = paddle::platform::ProfilerState::kAll;
153153
// The default device_id of paddle::platform::CUDAPlace is 0.
154154
// Users can get the device_id using:
155155
// int device_id = place.GetDeviceId();
@@ -172,7 +172,7 @@ void TestInference(const std::string& dirname,
172172
}
173173
// Disable the profiler and print the timing information
174174
paddle::platform::DisableProfiler(paddle::platform::EventSortingKey::kDefault,
175-
"load_program_profiler.txt");
175+
"load_program_profiler");
176176
paddle::platform::ResetProfiler();
177177

178178
// 3. Get the feed_target_names and fetch_target_names
@@ -237,7 +237,7 @@ void TestInference(const std::string& dirname,
237237
// Disable the profiler and print the timing information
238238
paddle::platform::DisableProfiler(
239239
paddle::platform::EventSortingKey::kDefault,
240-
"run_inference_profiler.txt");
240+
"run_inference_profiler");
241241
paddle::platform::ResetProfiler();
242242
}
243243

0 commit comments

Comments
 (0)