Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load ML Timeline on Client even if other XDP libraries are not available #8792

Open
wants to merge 2 commits into
base: master
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
60 changes: 33 additions & 27 deletions src/runtime_src/core/common/xdp/profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "core/common/config_reader.h"
#include "core/common/dlfcn.h"
#include "core/common/module_loader.h"
#include "core/common/message.h"
#include <functional>

#ifdef _WIN32
Expand Down Expand Up @@ -401,65 +402,70 @@ update_device(void* handle)
}
#endif

if (xrt_core::config::get_ml_timeline()) {
try {
xrt_core::xdp::ml_timeline::load();
xrt_core::xdp::ml_timeline::update_device(handle);
}
catch (...) {
xrt_core::message::send(xrt_core::message::severity_level::debug, "XRT",
"Failed to load ML Timeline library.");
}
}

if (xrt_core::config::get_aie_halt()) {
try {
xrt_core::xdp::aie::halt::load();
xrt_core::xdp::aie::halt::update_device(handle);
}
catch (...) {
return;
}
xrt_core::xdp::aie::halt::update_device(handle);
xrt_core::message::send(xrt_core::message::severity_level::debug, "XRT",
"Failed to load AIE Halt library.");
}
}

if (xrt_core::config::get_aie_profile()) {
try {
xrt_core::xdp::aie::profile::load();
xrt_core::xdp::aie::profile::update_device(handle);
}
catch (...) {
return;
}
xrt_core::xdp::aie::profile::update_device(handle);
xrt_core::message::send(xrt_core::message::severity_level::debug, "XRT",
"Failed to load AIE Profile library.");
}
}

if (xrt_core::config::get_aie_trace()) {
try {
xrt_core::xdp::aie::trace::load();
xrt_core::xdp::aie::trace::update_device(handle);
}
catch (...) {
return;
xrt_core::message::send(xrt_core::message::severity_level::debug, "XRT",
"Failed to load AIE Trace library.");
}
xrt_core::xdp::aie::trace::update_device(handle);

}

if (xrt_core::config::get_aie_debug()) {
try {
xrt_core::xdp::aie::debug::load();
xrt_core::xdp::aie::debug::update_device(handle);
}
catch (...) {
return;
}
xrt_core::xdp::aie::debug::update_device(handle);
}

if (xrt_core::config::get_ml_timeline()) {
try {
xrt_core::xdp::ml_timeline::load();
}
catch (...) {
return;
}
xrt_core::xdp::ml_timeline::update_device(handle);
xrt_core::message::send(xrt_core::message::severity_level::debug, "XRT",
"Failed to load AIE Debug library.");
}
}

if (xrt_core::config::get_aie_pc()) {
try {
xrt_core::xdp::aie_pc::load();
xrt_core::xdp::aie_pc::update_device(handle);
}
catch (...) {
return;
}
xrt_core::xdp::aie_pc::update_device(handle);
xrt_core::message::send(xrt_core::message::severity_level::debug, "XRT",
"Failed to load AIE PC library.");
}
}

#elif defined(XDP_VE2_BUILD)
Expand Down Expand Up @@ -495,6 +501,8 @@ finish_flush_device(void* handle)

#ifdef XDP_CLIENT_BUILD

if (xrt_core::config::get_ml_timeline())
xrt_core::xdp::ml_timeline::finish_flush_device(handle);
if (xrt_core::config::get_aie_halt())
xrt_core::xdp::aie::halt::finish_flush_device(handle);
if (xrt_core::config::get_aie_profile())
Expand All @@ -503,8 +511,6 @@ finish_flush_device(void* handle)
xrt_core::xdp::aie::trace::end_trace(handle);
if (xrt_core::config::get_aie_debug())
xrt_core::xdp::aie::debug::end_debug(handle);
if (xrt_core::config::get_ml_timeline())
xrt_core::xdp::ml_timeline::finish_flush_device(handle);
if (xrt_core::config::get_aie_pc())
xrt_core::xdp::aie_pc::finish_flush_device(handle);

Expand Down
Loading