Skip to content

Commit

Permalink
fixing issue in adf::event crash (#8119) (#8120)
Browse files Browse the repository at this point in the history
Co-authored-by: ch vamshi krishna <[email protected]>
(cherry picked from commit 17e413b)
  • Loading branch information
chvamshi-xilinx authored Apr 30, 2024
1 parent 899b001 commit 5e1c2a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/runtime_src/core/common/api/aie/xrt_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,9 @@ xrtAIEStartProfiling(xrtDeviceHandle handle, int option, const char *port1Name,
auto event = create_profiling_event(handle);
if (option < 0 || option > 3)
throw xrt_core::error(-EINVAL, "Not a valid profiling option");
auto hdl = event->start_profiling(option, port1Name, port2Name, value);
const std::string port1 = port1Name ? port1Name : "";
const std::string port2 = port2Name ? port2Name : "";
auto hdl = event->start_profiling(option, port1, port2, value);
if (hdl != xrt::aie::profiling_impl::invalid_handle) {
profiling_cache[hdl] = event;
return hdl;
Expand Down

0 comments on commit 5e1c2a5

Please sign in to comment.