Skip to content

[Feature] Update website for launch diff #37

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

Closed
wants to merge 3 commits into from

Conversation

FindHao
Copy link
Member

@FindHao FindHao commented Jul 20, 2025

This pull request updates the website to visualize the new launch_diff event data generated by the parser. It introduces several new React components to display complex diff information in a user-friendly way. The main KernelOverview page is now much more powerful, allowing users to see not just the compilation details of a kernel, but also a detailed breakdown of how its parameters and arguments changed across multiple launches.

Detailed Changes

New Components

  • ArgumentViewer.tsx: A new component to display kernel arguments in a structured and readable format.
  • DiffViewer.tsx: A versatile component to visualize the launch_diff data. It can render different types of diffs, including argument diffs, value distributions, and simple summaries.
  • StackDiffViewer.tsx: A specialized component for displaying differences in stack traces between launches.

Page Updates

  • KernelOverview.tsx:
    • Launch Analysis Section: A major new section has been added to display the launch_diff information. It shows total launches, which parameters were constant, and which ones varied, using the new ArgumentViewer and DiffViewer components.
    • Compilation Metadata: The layout has been improved to better handle long metadata values, preventing UI clutter.
    • Stack Trace: The stack trace is now explicitly labeled as the "Compilation Stack Trace".

Data Loading Logic

  • dataLoader.ts:
    • The data loading logic has been updated to handle the new launch_diff event type.
    • processKernelData now uses a two-pass approach. The first pass gathers all compilation events, and the second pass attaches the corresponding launch_diff data. This ensures that the launch analysis is correctly associated with each kernel.
    • Interfaces (LogEntry, ProcessedKernel) have been updated to include the launchDiff data.

FindHao added 2 commits July 20, 2025 17:14
Summary:
- Updated `parse_single_trace_content` to only process compilation events, improving efficiency by skipping non-compilation events.
- Enhanced the handling of IR file mappings and bidirectional mappings between different IR types.
- Improved the organization of output lines for final writing, ensuring accurate grouping of compilation and launch events by kernel hash.
- Added new utility functions for flattening and unflattening dictionaries, and for generating launch diffs, enhancing the overall functionality of the module.

These changes aim to streamline the parsing process and improve the clarity and maintainability of the codebase.
Summary:
- Introduced `ArgumentViewer` to display argument distributions and differences in a structured format.
- Added `DiffViewer` to handle and present differing fields, integrating `ArgumentViewer` for extracted arguments.
- Created `StackDiffViewer` to visualize stack traces with collapsible sections for better user experience.
- Updated `KernelOverview` to incorporate the new components for enhanced launch analysis and metadata display.
- Enhanced `dataLoader` to support launch_diff events, improving kernel data processing.

These changes aim to improve the visualization and analysis of kernel launch data, enhancing the overall functionality of the application.
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 20, 2025
Summary:
- Added comments for clarity, including a note for the dropdown arrow icon in both `ArgumentViewer` and `StackDiffViewer`.
- Updated the `renderSimpleDiff` function in `DiffViewer` to use a more descriptive parameter name.

These changes improve code readability and maintainability across the components.
@facebook-github-bot
Copy link
Contributor

@FindHao has imported this pull request. If you are a Meta employee, you can view this in D78667053.

@facebook-github-bot
Copy link
Contributor

@FindHao merged this pull request in 5076f8c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants