Skip to content
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
15 changes: 12 additions & 3 deletions xprof/convert/xplane_to_tool_names.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,18 @@ absl::StatusOr<std::string> GetAvailableToolNames(
has_dcn_collective_stats =
has_dcn_collective_stats || HasDcnCollectiveStatsInXSpace(*xspace);

std::vector<const XPlane*> tpu_planes = tsl::profiler::FindPlanesWithPrefix(
*xspace, tsl::profiler::kTpuPlanePrefix);
for (const XPlane* plane : tpu_planes) {
// Check both TPU and GPU planes for perf counter data.
std::vector<const XPlane*> device_planes =
tsl::profiler::FindPlanesWithPrefix(*xspace,
tsl::profiler::kTpuPlanePrefix);
{
std::vector<const XPlane*> gpu_planes =
tsl::profiler::FindPlanesWithPrefix(*xspace,
tsl::profiler::kGpuPlanePrefix);
device_planes.insert(device_planes.end(), gpu_planes.begin(),
gpu_planes.end());
}
for (const XPlane* plane : device_planes) {
tsl::profiler::XPlaneVisitor visitor =
tsl::profiler::CreateTfXPlaneVisitor(plane);
visitor.ForEachLine([&](const tsl::profiler::XLineVisitor& line) {
Expand Down