From be22e589ba9d4bfe124505e738bfbe488e46f982 Mon Sep 17 00:00:00 2001 From: Mo Date: Thu, 17 Oct 2024 14:50:15 +0000 Subject: [PATCH] #13950: Better debug messages --- tt_metal/tools/profiler/process_ops_logs.py | 2 +- tt_metal/tools/profiler/profiler.cpp | 1 + tt_metal/tools/profiler/tt_metal_profiler.cpp | 2 ++ ttnn/tracy/__main__.py | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tt_metal/tools/profiler/process_ops_logs.py b/tt_metal/tools/profiler/process_ops_logs.py index 37f1f0036be..0d72690566f 100755 --- a/tt_metal/tools/profiler/process_ops_logs.py +++ b/tt_metal/tools/profiler/process_ops_logs.py @@ -343,7 +343,7 @@ def get_device_data_generate_report( if cleanup_device_log: os.remove(deviceTimesLog) else: - logger.info("No device logs found") + logger.warning(f"No device logs found here: {deviceTimesLog}") return rowDicts diff --git a/tt_metal/tools/profiler/profiler.cpp b/tt_metal/tools/profiler/profiler.cpp index ff4c7078723..673f497b231 100644 --- a/tt_metal/tools/profiler/profiler.cpp +++ b/tt_metal/tools/profiler/profiler.cpp @@ -255,6 +255,7 @@ void DeviceProfiler::dumpResultToFile( if (!std::filesystem::exists(log_path)) { log_file.open(log_path); + log_info("Device profiler log path is set to {}", log_path); log_file << "ARCH: " << get_string_lowercase(device_architecture) << ", CHIP_FREQ[MHz]: " << device_core_frequency << std::endl; log_file << "PCIe slot, core_x, core_y, RISC processor type, timer_id, time[cycles since reset], stat value, run ID, run host ID, zone name, zone phase, source line, source file" << std::endl; } diff --git a/tt_metal/tools/profiler/tt_metal_profiler.cpp b/tt_metal/tools/profiler/tt_metal_profiler.cpp index 0832677dc7f..df700c1023e 100644 --- a/tt_metal/tools/profiler/tt_metal_profiler.cpp +++ b/tt_metal/tools/profiler/tt_metal_profiler.cpp @@ -342,6 +342,8 @@ void DumpDeviceProfileResults(Device *device, bool lastDump) { ZoneScoped; std::vector workerCores; auto device_id = device->id(); + log_info("Dumping device {} profiler data", device_id); + auto device_num_hw_cqs = device->num_hw_cqs(); CoreType dispatch_core_type = dispatch_core_manager::instance().get_dispatch_core_type(device_id); for (const CoreCoord& core : tt::get_logical_compute_cores(device_id, device_num_hw_cqs, dispatch_core_type)) { diff --git a/ttnn/tracy/__main__.py b/ttnn/tracy/__main__.py index 10e2a03bb3c..58692217e80 100644 --- a/ttnn/tracy/__main__.py +++ b/ttnn/tracy/__main__.py @@ -101,6 +101,7 @@ def main(): if not doReport: code = None + logger.info(f"Running {' '.join(args)}") if options.module: import runpy