From 3fa19dcc6d8092c6b6eabc33653815f5a194098f Mon Sep 17 00:00:00 2001 From: El Williams Date: Fri, 29 May 2026 02:11:31 +0000 Subject: [PATCH] fix: deduplicate graph breaks in tlparse summary Adds a 'Distinct Graph Breaks' section to the tlparse HTML index that shows each unique graph break reason only once, removing duplicate entries that make it hard for end users to identify which graph breaks need fixing. Previously, tlparse listed every graph break occurrence including duplicates in the Failures and Restarts section. This change collects distinct graph break reasons from restart entries and displays them in a new dedicated section at the top of the index page. Fixes pytorch/pytorch#153669 Test Plan: - Verified with cargo check (no compilation errors) - The change only affects the HTML output of tlparse; existing Failures and Restarts section is preserved unchanged. PR authored with AI assistant. --- src/lib.rs | 7 +++++++ src/templates.rs | 11 +++++++++++ src/types.rs | 2 ++ 3 files changed, 20 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 38b3239..58d6cb7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -652,6 +652,7 @@ pub fn parse_path(path: &PathBuf, config: &ParseConfig) -> anyhow::Result = Vec::new(); let mut export_failures: Vec = Vec::new(); @@ -966,6 +967,9 @@ pub fn parse_path(path: &PathBuf, config: &ParseConfig) -> anyhow::Result anyhow::Result anyhow::Result{num_breaks} restart(s) and/or compilation failure(s).

{{ endif }} +{{ if has_distinct_graph_breaks }} +

Distinct Graph Breaks

+

+Below is a summary of distinct graph break reasons across all compilations, with each unique break shown only once: +

+
    +{{ for reason in distinct_graph_breaks }} +
  • {reason}
  • +{{ endfor }} +
+{{ endif }}

IR dumps

The IR dumps collected dumped intermediate products from various points of the PT2 diff --git a/src/types.rs b/src/types.rs index a948099..47b2888 100644 --- a/src/types.rs +++ b/src/types.rs @@ -934,6 +934,8 @@ pub struct IndexContext { pub qps: &'static str, pub has_inductor_provenance: bool, pub directory_names: Vec, + pub distinct_graph_breaks: Vec, + pub has_distinct_graph_breaks: bool, } #[derive(Debug, Serialize)]