Skip to content
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
2ea7874
WIP: Compute view revamp - box layouts and Kernel Details workspace
dhingora-amd Sep 28, 2026
749cfb2
Merge origin/main into dhingora/compute-ui-revamp
dhingora-amd Sep 28, 2026
64e2c0d
WIP: Compute inline compare - A/B in Kernel Details, multi-workload rail
dhingora-amd Sep 29, 2026
1e084e2
WIP: Workload Details as a Kernel Details panel, no compute tab bar
dhingora-amd Sep 29, 2026
5ac91a0
Merge remote-tracking branch 'origin/main' into dhingora/compute-inli…
dhingora-amd Nov 4, 2026
b62a9d7
WIP: Move compute Layout/Panels into the app toolbar
dhingora-amd Nov 4, 2026
269ffc9
Clean up compute inline compare and fix two compare bugs
dhingora-amd Nov 5, 2026
c8de730
Merge remote-tracking branch 'origin/main' into dhingora/compute-inli…
dhingora-amd Nov 6, 2026
c00af59
Address PR review: metric table, compare and layout fixes
dhingora-amd Nov 13, 2026
c3c172b
Move Kernel Details panel logic into per-panel classes
dhingora-amd Nov 13, 2026
d563eb4
Add a Pinned Metrics panel to Kernel Details
dhingora-amd Nov 13, 2026
c811b21
Address PR review: compare columns, pivot errors, panels and layout
dhingora-amd Nov 19, 2026
64b5b14
Merge remote-tracking branch 'origin/main' into dhingora/compute-inli…
dhingora-amd Nov 19, 2026
9a2a903
Address PR review: pane files, stale pivot responses, independent ker…
dhingora-amd Nov 20, 2026
ab5f3d5
Merge remote-tracking branch 'origin/main' into dhingora/compute-inli…
dhingora-amd Nov 20, 2026
9a280d9
Match kernel table metrics by name per workload
dhingora-amd Nov 23, 2026
26060fa
Address PR review: per-workload metric ids, pin swaps, panel availabi…
dhingora-amd Nov 26, 2026
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
398 changes: 307 additions & 91 deletions .agents/UI.md

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,14 @@ set(VIEW_FILES
src/view/src/compute/rocprofvis_compute_view.cpp
src/view/src/compute/rocprofvis_compute_table_view.cpp
src/view/src/compute/rocprofvis_compute_kernel_details.cpp
src/view/src/compute/rocprofvis_compute_kernel_details_panes.cpp
src/view/src/compute/rocprofvis_compute_memory_chart.cpp
src/view/src/model/compute/rocprofvis_memory_chart_model.cpp
src/view/src/compute/rocprofvis_compute_selection.cpp
src/view/src/compute/rocprofvis_compute_summary.cpp
src/view/src/compute/rocprofvis_compute_roofline.cpp
src/view/src/compute/rocprofvis_compute_workload_view.cpp
src/view/src/compute/rocprofvis_compute_kernel_metric_table.cpp
src/view/src/compute/rocprofvis_compute_comparison.cpp
${ISA_VIEW_FILES}
src/view/src/compute/rocprofvis_compute_tester.cpp
src/view/src/model/compute/rocprofvis_compute_data_model.cpp
Expand Down Expand Up @@ -567,6 +567,9 @@ if(BUILD_TESTING AND ROCPROFVIS_ENABLE_UI_TESTS)
target_compile_definitions(imgui_test_engine PUBLIC
IMGUI_ENABLE_TEST_ENGINE
IMGUI_TEST_ENGINE_ENABLE_COROUTINE_STDTHREAD_IMPL=1
# Screenshots for visual review (ctx->CaptureScreenshot); the engine's
# imconfig template that would default this on is not included.
IMGUI_TEST_ENGINE_ENABLE_CAPTURE=1
)
target_include_directories(imgui_test_engine PUBLIC
${IMGUI_TEST_ENGINE_DIR}
Expand Down
1,154 changes: 931 additions & 223 deletions src/app/test/app_tests.cpp

Large diffs are not rendered by default.

52 changes: 51 additions & 1 deletion src/app/test/test_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,45 @@
#include "rocprofvis_platform_helpers.h"
#endif
#include <GLFW/glfw3.h>
#ifdef __linux__
# include <GL/gl.h>
#endif
#include <algorithm>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <vector>

// Frames left to render before the loop may sleep; see RENDER_FRAMES_AFTER_INPUT.
static int g_frames_to_render = 1;

#ifdef __linux__
// Test-engine screen capture (ctx->CaptureScreenshot) for the OpenGL backend. It
// reads the frame just drawn, so the loop runs the engine's post-swap step
// before presenting while this is installed. Rows come back bottom-up and are
// flipped to the top-down order the engine expects.
static bool
capture_framebuffer_gl(ImGuiID viewport_id, int x, int y, int w, int h,
unsigned int* pixels, void* user_data)
{
(void) viewport_id;
(void) user_data;
const int gl_y = static_cast<int>(ImGui::GetIO().DisplaySize.y) - (y + h);
glPixelStorei(GL_PACK_ALIGNMENT, 1);
glReadPixels(x, gl_y, w, h, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
std::vector<unsigned int> row(static_cast<size_t>(w));
for(int top = 0, bottom = h - 1; top < bottom; ++top, --bottom)
{
unsigned int* top_row = pixels + static_cast<size_t>(top) * w;
unsigned int* bottom_row = pixels + static_cast<size_t>(bottom) * w;
std::copy(top_row, top_row + w, row.begin());
std::copy(bottom_row, bottom_row + w, top_row);
std::copy(row.begin(), row.end(), bottom_row);
}
return true;
}
#endif

static void
parse_command_line_args(int argc, char** argv, RocProfVis::App::CLIParser& cli_parser,
bool& exit_app)
Expand Down Expand Up @@ -143,6 +175,13 @@ main(int argc, char** argv)
rocprofvis_view_open_files({ cli_parser.GetOptionValue("file") });
}

#ifdef __linux__
// Only the OpenGL backend has a current GL context to read from.
if(glfwGetCurrentContext() != nullptr)
{
ImGuiTestEngine_GetIO(engine).ScreenCaptureFunc = capture_framebuffer_gl;
}
#endif
ImGuiTestEngine_Start(engine, ImGui::GetCurrentContext());
RegisterAppTests(engine);

Expand Down Expand Up @@ -291,12 +330,23 @@ main(int argc, char** argv)
const bool is_minimized = (draw_data->DisplaySize.x <= 0.0f ||
draw_data->DisplaySize.y <= 0.0f);
ImGuiTestEngine_PreSwap(engine);
// A GL capture reads the back buffer, which the swap leaves
// undefined, so it runs between drawing and presenting.
const bool capture_before_present =
ImGuiTestEngine_GetIO(engine).ScreenCaptureFunc != nullptr;
if(!is_minimized)
{
backend.m_render(&backend, draw_data, &clear_color);
if(capture_before_present)
{
ImGuiTestEngine_PostSwap(engine);
}
backend.m_present(&backend);
}
ImGuiTestEngine_PostSwap(engine);
if(is_minimized || !capture_before_present)
{
ImGuiTestEngine_PostSwap(engine);
}

#ifndef __APPLE__
// Applied after the frame so the window is never resized
Expand Down
163 changes: 111 additions & 52 deletions src/view/src/compute/isa/rocprofvis_compute_isa_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "spdlog/spdlog.h"
#include "widgets/rocprofvis_gui_helpers.h"
#include "widgets/rocprofvis_notification_manager.h"
#include "widgets/rocprofvis_tab_container.h"

namespace RocProfVis
{
Expand All @@ -40,30 +39,6 @@ pc_sampling_request_id(PcSamplingLayer layer)
return DataProvider::FETCH_PC_SAMPLING_ISA_REQUEST_ID;
}

constexpr const char* ISA_VIEW_DISABLED_TOOLTIP =
"This database file has no ISA lines, so ISA View is inactive.";

TabItem
ComputeIsaView::CreateTabItem(DataProvider& data_provider)
{
return RocWidget::CreateTabItem("ISA View", TAB_ID,
std::make_shared<ComputeIsaView>(data_provider));
}

TabItem
ComputeIsaView::CreateTabItem(DataProvider& data_provider, bool has_isa_lines)
{
if(has_isa_lines)
{
return CreateTabItem(data_provider);
}

TabItem tab = RocWidget::CreateTabItem("ISA View", TAB_ID, nullptr);
tab.m_enabled = false;
tab.m_disabled_tooltip = ISA_VIEW_DISABLED_TOOLTIP;
return tab;
}

ComputeIsaView::ComputeIsaView(DataProvider& data_provider)
: RocWidget()
, m_settings(SettingsManager::GetInstance())
Expand All @@ -84,8 +59,6 @@ ComputeIsaView::ComputeIsaView(DataProvider& data_provider)
m_horizontal_split_container->SetSplit(0.5f);
m_horizontal_split_container->ShowSplitter(true);

SubscribeToEvents();

m_data_provider.SetFetchPcSamplingCallback(
[this](const std::string&, PcSamplingLayer layer, uint32_t kernel_id,
uint64_t source_file_uuid, uint32_t generation, uint64_t request_token,
Expand All @@ -98,36 +71,51 @@ ComputeIsaView::ComputeIsaView(DataProvider& data_provider)
ComputeIsaView::~ComputeIsaView()
{
m_data_provider.SetFetchPcSamplingCallback(nullptr);
EventManager::GetInstance()->Unsubscribe(
static_cast<int>(RocEvents::kComputeKernelSelectionChanged),
m_kernel_selection_changed_token);
EventManager::GetInstance()->Unsubscribe(
static_cast<int>(RocEvents::kComputeWorkloadSelectionChanged),
m_workload_selection_changed_token);
}

void
ComputeIsaView::SubscribeToEvents()
ComputeIsaView::SetSelectedWorkload(uint32_t workload_id)
{
auto workload_changed = [this](std::shared_ptr<RocEvent> e) {
auto event = std::dynamic_pointer_cast<ComputeSelectionChangedEvent>(e);
if(event && event->GetSourceId() == m_data_provider.GetTraceFilePath())
{
SelectWorkload(event->GetId());
}
};
m_workload_selection_changed_token = EventManager::GetInstance()->Subscribe(
static_cast<int>(RocEvents::kComputeWorkloadSelectionChanged), workload_changed);
m_selected_workload_id = workload_id;
if(m_follow_selection)
{
SelectWorkload(workload_id);
}
}

auto kernel_changed = [this](std::shared_ptr<RocEvent> e) {
auto event = std::dynamic_pointer_cast<ComputeSelectionChangedEvent>(e);
if(event && event->GetSourceId() == m_data_provider.GetTraceFilePath())
{
LoadData(event->GetId());
}
};
m_kernel_selection_changed_token = EventManager::GetInstance()->Subscribe(
static_cast<int>(RocEvents::kComputeKernelSelectionChanged), kernel_changed);
void
ComputeIsaView::SetSelectedKernel(uint32_t kernel_id)
{
m_selected_kernel_id = kernel_id;
if(m_follow_selection)
{
LoadData(kernel_id);
}
}

void
ComputeIsaView::ShowKernel(uint32_t workload_id, uint32_t kernel_id)
{
const bool showing = !m_follow_selection && workload_id == m_current_workload_id &&
kernel_id == m_current_kernel_id;
m_follow_selection = false;
if(!showing)
{
SelectWorkload(workload_id);
LoadData(kernel_id);
}
}

void
ComputeIsaView::FollowSelection()
{
if(m_follow_selection)
{
return;
}
m_follow_selection = true;
SelectWorkload(m_selected_workload_id);
LoadData(m_selected_kernel_id);
}

void
Expand Down Expand Up @@ -782,5 +770,76 @@ ComputeIsaView::RenderSourceFileDropdown()
}
}

ComputeIsaPane::ComputeIsaPane(const IKernelCompare& compare, DataProvider& data_provider,
bool has_isa_lines)
: ComputeSidedPane(compare)
, m_isa_view(has_isa_lines ? std::make_shared<ComputeIsaView>(data_provider) : nullptr)
{}

const char*
ComputeIsaPane::Title() const
{
return "ISA";
}

bool
ComputeIsaPane::IsAvailable() const
{
return m_isa_view != nullptr;
}

void
ComputeIsaPane::RenderBody(bool)
{
if(m_isa_view)
{
m_isa_view->Render();
}
}

void
ComputeIsaPane::Update()
{
if(m_isa_view)
{
m_isa_view->Update();
}
}

void
ComputeIsaPane::OnWorkloadSelected(uint32_t workload_id)
{
if(m_isa_view)
{
m_isa_view->SetSelectedWorkload(workload_id);
}
}

void
ComputeIsaPane::OnKernelSelected(uint32_t kernel_id)
{
if(m_isa_view)
{
m_isa_view->SetSelectedKernel(kernel_id);
}
}

void
ComputeIsaPane::ApplyCompare(bool)
{
if(m_isa_view)
{
if(ShownSide() == CompareSide::kB)
{
m_isa_view->ShowKernel(m_compare.CompareWorkloadId(),
m_compare.CompareKernelId());
}
else
{
m_isa_view->FollowSelection();
}
}
}

} // namespace View
} // namespace RocProfVis
Loading
Loading