From 9d80870f81fd96f79f07463cc756d575b2c04be9 Mon Sep 17 00:00:00 2001 From: Sam Larsen Date: Wed, 4 Dec 2024 12:47:51 -0800 Subject: [PATCH] Allow for null compliant_custom_ops and null m.non_compliant_ops Test Plan: ``` $ tlparse -o /tmp/foo --overwrite --no-browser --strict ~/tmp/trace_logs_slarsen/dedicated_log_torch_trace_l2k873uc.log Detected rank: None Parser compilation_metrics failed: Encountered rendering error on line 60, column 19. Reason: Expected an array for path 'm.compliant_custom_ops' but found a non-iterable value. [00:00:00] [#############################################################################################################################################################################################] 133.30 KiB/133.30 KiB [22.37 MiB/s] (0s) Stats { ok: 62, other_rank: 0, fail_glog: 0, fail_json: 0, fail_payload_md5: 0, fail_dynamo_guards_json: 0, fail_parser: 0, unknown: 0 } Stats { ok: 63, other_rank: 0, fail_glog: 0, fail_json: 0, fail_payload_md5: 0, fail_dynamo_guards_json: 0, fail_parser: 1, unknown: 0 } 2024-12-04T19:57:19.454125Z ERROR cli_log: Something went wrong 2024-12-04T19:57:19.454280Z ERROR cli_log: An error was detected, uploading logs to LogView... ... ``` ``` $ /home/slarsen/local/tlparse/target/debug/tlparse -o /tmp/foo --overwrite --no-browser --strict ~/tmp/trace_logs_slarsen/dedicated_log_torch_trace_l2k873uc.log Detected rank: None [00:00:00] [############################################################################################################################################################################################] 133.30 KiB/133.30 KiB [723.83 KiB/s] (0s) Stats { ok: 62, other_rank: 0, fail_glog: 0, fail_json: 0, fail_payload_md5: 0, fail_dynamo_guards_json: 0, fail_parser: 0, unknown: 0 } Stats { ok: 63, other_rank: 0, fail_glog: 0, fail_json: 0, fail_payload_md5: 0, fail_dynamo_guards_json: 0, fail_parser: 0, unknown: 0 } ``` --- src/templates.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/templates.rs b/src/templates.rs index 6522ee8..fce2005 100644 --- a/src/templates.rs +++ b/src/templates.rs @@ -270,14 +270,18 @@ pub static TEMPLATE_COMPILATION_METRICS: &str = r#"

Graph Nodes: {m.graph_node_count}

Graph Inputs: {m.graph_input_count}

Custom Ops

+ {{ if m.compliant_custom_ops }}

Compliant Custom Ops:

{{ for op in m.compliant_custom_ops }}
  • {op}
  • {{ endfor }} + {{ endif }} + {{ if m.non_compliant_ops }}

    Non-Compliant Custom Ops:

    {{ for op in m.non_compliant_ops }}
  • {op}
  • {{ endfor }} + {{ endif }}

    Symbolic shape specializations