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

[XDP] Bug fixes to parsing of graph-based xrt.ini settings #8722

Merged
merged 2 commits into from
Jan 28, 2025
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ AIEControlConfigFiletype::getInterfaceTiles(const std::string& graphName,
&& (portName.compare(logicalName) != 0))
continue;
if ((graphName.compare("all") != 0)
&& (graphName.compare(currGraph) != 0)
&& (currGraph.find(graphName) == std::string::npos)
&& !useColumn)
continue;

Expand Down Expand Up @@ -512,8 +512,12 @@ AIEControlConfigFiletype::getEventTiles(const std::string& graph_name,
int startCount = 0;

for (auto& graph : graphsMetadata.get()) {
// Make sure this is requested graph
// NOTE: Only top-level graphs are currently listed in metadata,
// so search is reversed to support sub-graph requests
// (e.g., "mygraph" is found in "mygraph.subgraph1")
auto currGraph = graph.second.get<std::string>("name");
if ((currGraph.find(graph_name) == std::string::npos)
if ((graph_name.find(currGraph) == std::string::npos)
&& (graph_name.compare("all") != 0))
continue;

Expand Down Expand Up @@ -548,13 +552,13 @@ AIEControlConfigFiletype::getTiles(const std::string& graph_name,
module_type type,
const std::string& kernel_name) const
{
// Catch memory tiles and 'all' AIE tiles
// Catch special cases (memory tiles, memory modules, and all kernels)
if (type == module_type::mem_tile)
return getMemoryTiles(graph_name, kernel_name);
if (kernel_name.compare("all") == 0)
if ((type == module_type::dma) || (kernel_name.compare("all") == 0))
return getAllAIETiles(graph_name);

// Now search by graph-kernel pairs
// Search by graph-kernel pairs
auto kernelToTileMapping = aie_meta.get_child_optional("aie_metadata.TileMapping.AIEKernelToTileMapping");
if (!kernelToTileMapping && (kernel_name.compare("all") == 0))
return getAIETiles(graph_name);
Expand All @@ -566,7 +570,9 @@ AIEControlConfigFiletype::getTiles(const std::string& graph_name,
std::vector<tile_type> tiles;
auto rowOffset = getAIETileRowOffset();

// Traverse all tiles in kernel map
for (auto const &mapping : kernelToTileMapping.get()) {
// Make sure this tile is what we're looking for
auto currGraph = mapping.second.get<std::string>("graph");
if ((currGraph.find(graph_name) == std::string::npos)
&& (graph_name.compare("all") != 0))
Expand All @@ -579,6 +585,7 @@ AIEControlConfigFiletype::getTiles(const std::string& graph_name,
continue;
}

// Store this tile
tile_type tile;
tile.col = mapping.second.get<uint8_t>("column");
tile.row = mapping.second.get<uint8_t>("row") + rowOffset;
Expand Down
Loading