From 45c50a5abffb3cb0c079c2bd7dd66830a45a06a0 Mon Sep 17 00:00:00 2001 From: Prajesh Praveen Anchalia Date: Thu, 14 Nov 2024 09:47:05 -0800 Subject: [PATCH] Add logger for pt2 compile chromium events to hive (#2535) Summary: X-link: https://github.com/pytorch/pytorch/pull/139941 Pull Request resolved: https://github.com/pytorch/benchmark/pull/2535 Logging raw chromium events to hive per job run enables us to build combined rank perfetto traces without having to depend on Logarithm and deal with things like rate limits etc. We can easily build a utility to query hive and upload traces to manifold and view them on perfetto Reviewed By: c00w, jamesjwu Differential Revision: D65525513 fbshipit-source-id: 95745eafe669cef16a6ad15c66ea5583f9f6a77c --- userbenchmark/dynamo/dynamobench/_dynamo/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/userbenchmark/dynamo/dynamobench/_dynamo/utils.py b/userbenchmark/dynamo/dynamobench/_dynamo/utils.py index 65095e7da..f0b736540 100644 --- a/userbenchmark/dynamo/dynamobench/_dynamo/utils.py +++ b/userbenchmark/dynamo/dynamobench/_dynamo/utils.py @@ -76,6 +76,7 @@ from torch._utils_internal import ( log_chromium_event_internal, log_compilation_event, + record_chromium_event_internal, signpost_event, ) from torch.fx._utils import _format_graph_code, lazy_format_graph_code @@ -1175,6 +1176,7 @@ def _log_timed_event( suppress_context=False, expect_trace_id=False, # Not every chromium event will have a trace_id ) + record_chromium_event_internal(event) return event def log_instant_event(