Skip to content

Commit

Permalink
Update format.
Browse files Browse the repository at this point in the history
  • Loading branch information
tianfang-fafafa committed Dec 11, 2024
1 parent 02ed552 commit 8e0f5ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ using EventInfo = std::tuple<
int, // tid
long long, // timestamp

Check warning on line 36 in onnxruntime/core/providers/vitisai/include/vaip/global_api.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Use int16_t/int64_t/etc, rather than the C type long [runtime/int] [4] Raw Output: onnxruntime/core/providers/vitisai/include/vaip/global_api.h:36: Use int16_t/int64_t/etc, rather than the C type long [runtime/int] [4]
long long // duration

Check warning on line 37 in onnxruntime/core/providers/vitisai/include/vaip/global_api.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Use int16_t/int64_t/etc, rather than the C type long [runtime/int] [4] Raw Output: onnxruntime/core/providers/vitisai/include/vaip/global_api.h:37: Use int16_t/int64_t/etc, rather than the C type long [runtime/int] [4]
>;
>;
void profiler_collect(
std::vector<EventInfo>& api_events,
std::vector<EventInfo>& kernel_events);

Check warning on line 41 in onnxruntime/core/providers/vitisai/include/vaip/global_api.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Add #include <vector> for vector<> [build/include_what_you_use] [4] Raw Output: onnxruntime/core/providers/vitisai/include/vaip/global_api.h:41: Add #include <vector> for vector<> [build/include_what_you_use] [4]
13 changes: 6 additions & 7 deletions onnxruntime/core/providers/vitisai/vitisai_profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ bool VitisaiProfiler::StartProfiling(TimePoint tp) {
}

void VitisaiProfiler::EndProfiling(TimePoint tp, Events& events) {

auto time_point =
std::chrono::duration_cast<std::chrono::microseconds>(tp.time_since_epoch()).count();
std::chrono::duration_cast<std::chrono::microseconds>(tp.time_since_epoch()).count();

std::vector<EventInfo> api_events;
std::vector<EventInfo> kernel_events;

Check warning on line 20 in onnxruntime/core/providers/vitisai/vitisai_profiler.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Add #include <vector> for vector<> [build/include_what_you_use] [4] Raw Output: onnxruntime/core/providers/vitisai/vitisai_profiler.cc:20: Add #include <vector> for vector<> [build/include_what_you_use] [4]
Expand All @@ -25,11 +24,11 @@ void VitisaiProfiler::EndProfiling(TimePoint tp, Events& events) {

for (auto& a : api_events) {
events.emplace_back(EventCategory::API_EVENT,
std::get<1>(a), // pid
std::get<2>(a), // tid
std::get<0>(a), // name
std::get<3>(a) - time_point, // timestamp
std::get<4>(a), // duration
std::get<1>(a), // pid
std::get<2>(a), // tid
std::get<0>(a), // name
std::get<3>(a) - time_point, // timestamp
std::get<4>(a), // duration
event_args);
}

Expand Down

0 comments on commit 8e0f5ab

Please sign in to comment.