From e674b1279bc9170c870266a11fc2905ef8c8487c Mon Sep 17 00:00:00 2001 From: Xuan-Son Nguyen Date: Sat, 30 May 2026 12:22:38 +0200 Subject: [PATCH] test: (test-llama-archs) log the config name first (#23885) --- tests/test-llama-archs.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/test-llama-archs.cpp b/tests/test-llama-archs.cpp index 3714eaedb..1def7faff 100644 --- a/tests/test-llama-archs.cpp +++ b/tests/test-llama-archs.cpp @@ -526,8 +526,9 @@ static int test_backends(const llm_arch target_arch, const size_t seed, const gg max_arch_name_length = std::max(max_arch_name_length, strlen(llm_arch_name(arch))); } - const std::string template_header = std::string("|%" + std::to_string(max_arch_name_length) + "s|%") + std::to_string(max_device_label_length) + "s|%6s|%15s|%9s|\n"; - const std::string template_row = std::string("|%" + std::to_string(max_arch_name_length) + "s|%") + std::to_string(max_device_label_length) + "s|%6s|%15s %10s|%20s|\n"; + const std::string template_header = std::string("|%" + std::to_string(max_arch_name_length) + "s|%") + std::to_string(max_device_label_length) + "s|%6s|%15s|%9s|\n"; + const std::string template_row_cfg = std::string("|%" + std::to_string(max_arch_name_length) + "s|%") + std::to_string(max_device_label_length) + "s|%6s|"; + const std::string template_row_res = "%15s %10s|%20s|\n"; bool all_ok = true; common_log_flush(common_log_main()); @@ -565,6 +566,11 @@ static int test_backends(const llm_arch target_arch, const size_t seed, const gg std::pair model_and_ctx_cpu; std::vector logits_cpu; for (device_config & dc : dev_configs) { + // print test config first; should anything fail during model loading or inference, at least we know which test case caused it + printf(template_row_cfg.c_str(), + llm_arch_name(arch), dc.label.c_str(), config_name.c_str()); + fflush(stdout); + std::pair model_and_ctx_dev; std::vector logits_dev; std::string status_nmse = "\033[1;33mSKIP\033[0m"; @@ -617,8 +623,9 @@ static int test_backends(const llm_arch target_arch, const size_t seed, const gg } } - printf(template_row.c_str(), llm_arch_name(arch), dc.label.c_str(), - config_name.c_str(), status_nmse.c_str(), nmse_str, status_roundtrip.c_str()); + // log the results for this test case + printf(template_row_res.c_str(), + status_nmse.c_str(), nmse_str, status_roundtrip.c_str()); } } }