Revert "Call internal log_compilation_event if it exists (#164855)"

This reverts commit 98a081a24c22072362dc536afd39a469e28939d4.

Reverted https://github.com/pytorch/pytorch/pull/164855 on behalf of https://github.com/albanD due to We should not land this kind of code in core ([comment](https://github.com/pytorch/pytorch/pull/164855#issuecomment-3387692988))
This commit is contained in:
PyTorch MergeBot
2025-10-09 22:38:45 +00:00
parent 6d27a8e509
commit 47956196d9

View File

@ -13,13 +13,6 @@ import torch
from torch._strobelight.compile_time_profiler import StrobelightCompileTimeProfiler
try:
from pt2_internal import ( # type: ignore[import-not-found]
log_compilation_event as internal_log_compilation_event,
)
except ImportError:
internal_log_compilation_event = None
_T = TypeVar("_T")
_P = ParamSpec("_P")
@ -135,10 +128,7 @@ def add_mlhub_insight(category: str, insight: str, insight_description: str):
def log_compilation_event(metrics):
if internal_log_compilation_event:
internal_log_compilation_event(vars(metrics))
else:
log.info("%s", metrics)
log.info("%s", metrics)
def upload_graph(graph):