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

[Internal] [Development] Support profile APIs 2024.2 #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
21 changes: 21 additions & 0 deletions src/runtime_src/core/common/config_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,27 @@ get_aie_profile_settings_tile_based_interface_tile_metrics()
return value;
}

inline std::string
get_aie_profile_settings_interface_tile_latency_metrics()
{
static std::string value = detail::get_string_value("AIE_profile_settings.interface_tile_latency", "");
return value;
}

inline std::string
get_aie_profile_settings_start_type()
{
static std::string value = detail::get_string_value("AIE_profile_settings.start_type", "time");
return value;
}

inline unsigned int
get_aie_profile_settings_start_iteration()
{
static unsigned int value = detail::get_uint_value("AIE_profile_settings.start_iteration", 1);
return value;
}

// AIE_trace_settings

inline std::string
Expand Down
13 changes: 13 additions & 0 deletions src/runtime_src/xdp/profile/database/static_info/aie_constructs.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,19 @@ enum class module_type {
aie_cfg_tile(uint32_t c, uint32_t r, module_type t) : column(c), row(r), type(t) {}
};

struct LatencyConfig
{
public:
tile_type src;
tile_type dest;
std::string metricSet;
uint32_t tranx_no;
bool isSource;
LatencyConfig() = default;
LatencyConfig(tile_type& s, tile_type& d, std::string m, uint32_t t, bool i) :
src(s), dest(d), metricSet(m), tranx_no(t), isSource(i) {}
};

} // end namespace xdp

#endif
6 changes: 6 additions & 0 deletions src/runtime_src/xdp/profile/database/static_info/aie_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
#include "filetypes/aie_control_config_filetype.h"
#include "filetypes/aie_trace_config_filetype.h"

#include <algorithm>
#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/ptree.hpp>
#include <cctype>
#include <cstdint>
#include <filesystem>
#include <memory>
Expand Down Expand Up @@ -397,4 +399,8 @@ namespace xdp::aie {
return startCols;
}

bool isDigitString(const std::string& str) {
return std::all_of(str.begin(), str.end(), ::isdigit);
}

} // namespace xdp::aie
3 changes: 3 additions & 0 deletions src/runtime_src/xdp/profile/database/static_info/aie_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ namespace xdp::aie {
XDP_CORE_EXPORT
std::vector<uint8_t> getPartitionStartColumnsClient(void* handle);

XDP_CORE_EXPORT
bool isDigitString(const std::string& str);

} // namespace xdp::aie

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,12 @@ AIEControlConfigFiletype::getInterfaceTiles(const std::string& graphName,
&& (metricStr.find("s2mm") == std::string::npos))
|| (!isMaster && (metricStr.find("input") == std::string::npos)
&& (metricStr.find("mm2s") == std::string::npos)))
continue;
{
// Process this tile for below profile API specific metrics
if ((metricStr != "interface_tile_latency") &&
(metricStr != "start_to_bytes_transferred"))
continue;
}

// Make sure column is within specified range (if specified)
if (useColumn && !((minCol <= shimCol) && (shimCol <= maxCol)))
Expand Down
Loading
Loading