Skip to content

Commit

Permalink
#13950: Better debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mo-tenstorrent committed Oct 18, 2024
1 parent 9baa114 commit ff4b989
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,10 @@ def mesh_device(request, silicon_arch_name, silicon_arch_wormhole_b0, device_par
logger.debug(f"multidevice with {mesh_device.get_num_devices()} devices is created")
yield mesh_device

logger.info(f"Mesh devicec close")

for device in mesh_device.get_devices():
logger.info(f"Dumping profiler for device {device}")
ttnn.DumpDeviceProfiler(device)

ttnn.close_mesh_device(mesh_device)
Expand Down
2 changes: 1 addition & 1 deletion tt_metal/tools/profiler/process_ops_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
1 change: 1 addition & 0 deletions tt_metal/tools/profiler/profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions tt_metal/tools/profiler/tt_metal_profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ void DumpDeviceProfileResults(Device *device, bool lastDump) {
ZoneScoped;
std::vector<CoreCoord> 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)) {
Expand Down
1 change: 1 addition & 0 deletions ttnn/tracy/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def main():

if not doReport:
code = None
logger.info(f"Running {' '.join(args)}")
if options.module:
import runpy

Expand Down

0 comments on commit ff4b989

Please sign in to comment.