From e8481c11c4b854ac67ac685d32f31c6c8e2651c8 Mon Sep 17 00:00:00 2001 From: NEWPLAN Date: Thu, 22 Aug 2024 11:20:09 +0800 Subject: [PATCH] Update zero.cuh log with line and file for better addressing. --- llmc/zero.cuh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/llmc/zero.cuh b/llmc/zero.cuh index e6c5b6e7c..123e70028 100644 --- a/llmc/zero.cuh +++ b/llmc/zero.cuh @@ -553,7 +553,11 @@ void multi_gpu_async_reduce_gradient( } // convenience macro that only prints if the rank of process is zero -#define printf0(...) if (::multi_gpu_config.process_rank == 0) { printf(__VA_ARGS__); } +#define printf0(...) \ + if (::multi_gpu_config.process_rank == 0) { \ + printf("[%s:%d] ", __FILE__, __LINE__); \ + printf(__VA_ARGS__); \ + } void set_zero_configs(MultiGpuConfig* config, int zero_stage, size_t total_parameters) { config->zero_stage = 0;