From 125f6ff05f559d38b4ec3ad025d8722391c36fba Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Wed, 7 Oct 2026 20:50:30 +0200 Subject: [PATCH] native_mmvq, mmvq_il_parity, generate: fix newline escapes in messages --- src/kernels/cuda/native_mmvq.cu | 6 ++---- src/kernels/mmvq_il_parity.cpp | 18 ++++++------------ src/program/generate.cpp | 3 ++- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/kernels/cuda/native_mmvq.cu b/src/kernels/cuda/native_mmvq.cu index bf511b96..364adeb1 100644 --- a/src/kernels/cuda/native_mmvq.cu +++ b/src/kernels/cuda/native_mmvq.cu @@ -2543,11 +2543,9 @@ const std::vector& il_env_rows() { bool ok = true; for (int i = 0; i < 5; ++i) { ok = ok && (r[i] == 0 || r[i] == 1 || r[i] == 2 || r[i] == 4); x.r[i] = (uint8_t) r[i]; } if (ok) out.push_back(x); - else std::fprintf(stderr, "strata: STRATA_MMVQ_IL_ROWS: rows must be 0/1/2/4 - entry ignored -"); + else std::fprintf(stderr, "strata: STRATA_MMVQ_IL_ROWS: rows must be 0/1/2/4 - entry ignored\n"); } else { - std::fprintf(stderr, "strata: STRATA_MMVQ_IL_ROWS: cannot read '%s' (type:ncols:r0,r1,r2,r3,r4) - ignored -", + std::fprintf(stderr, "strata: STRATA_MMVQ_IL_ROWS: cannot read '%s' (type:ncols:r0,r1,r2,r3,r4) - ignored\n", str.substr(pos, end - pos).c_str()); } pos = end + 1; diff --git a/src/kernels/mmvq_il_parity.cpp b/src/kernels/mmvq_il_parity.cpp index 30fc3301..149c53b7 100644 --- a/src/kernels/mmvq_il_parity.cpp +++ b/src/kernels/mmvq_il_parity.cpp @@ -178,8 +178,7 @@ int run_case(const Case& c, bool bench, cudaStream_t s) { void emit_table() { const int types[] = {23, 12, 13, 14}; const char* names[] = {"IQ4_XS", "Q4_K", "Q5_K", "Q6_K"}; - std::printf("// measured on this card by mmvq_il_parity --bench --emit-table -"); + std::printf("// measured on this card by mmvq_il_parity --bench --emit-table\n"); for (int ti = 0; ti < 4; ++ti) { std::printf(" {%d, {", types[ti]); for (int nc = 2; nc <= 4; ++nc) { @@ -203,8 +202,7 @@ void emit_table() { } std::printf("}%s", nc < 4 ? ", " : ""); } - std::printf("}}, // %s -", names[ti]); + std::printf("}}, // %s\n", names[ti]); } } @@ -218,22 +216,18 @@ int check_tables() { // sm_89 has no table of its own: it must answer exactly what the measured Ampere table says if (native_mmvq_il_rows_for(89, type, nc, n_out) != a || native_mmvq_il_rows_for(120, type, nc, n_out) != a) { ++bad; - std::printf("FAIL table: sm_89/sm_120 differ from sm_86 at type %d ncols %d n_out %d -", type, nc, n_out); + std::printf("FAIL table: sm_89/sm_120 differ from sm_86 at type %d ncols %d n_out %d\n", type, nc, n_out); } - if (a != 0 && a != 1 && a != 2 && a != 4) { ++bad; std::printf("FAIL table: rows %d -", a); } + if (a != 0 && a != 1 && a != 2 && a != 4) { ++bad; std::printf("FAIL table: rows %d\n", a); } } // Volta has its own table (PR 1401): Q6_K at 2 columns, 2560 rows -> 1 row a warp; the Ampere table says 0 there if (native_mmvq_il_rows_for(70, 14, 2, 2560) != 1 || native_mmvq_il_rows_for(86, 14, 2, 2560) != 0) { ++bad; - std::printf("FAIL table: the sm_70 table is not the V100's -"); + std::printf("FAIL table: the sm_70 table is not the V100's\n"); } if (native_mmvq_il_rows_for(89, 99, 2, 2560) != 0 || native_mmvq_il_rows_for(89, 12, 5, 2560) != 0) { ++bad; - std::printf("FAIL table: an unknown type or ncols must be 0 -"); + std::printf("FAIL table: an unknown type or ncols must be 0\n"); } return bad; } diff --git a/src/program/generate.cpp b/src/program/generate.cpp index c243f8f2..a511896a 100644 --- a/src/program/generate.cpp +++ b/src/program/generate.cpp @@ -4892,7 +4892,8 @@ int main(int argc, char** argv) { lookahead.set_depth(std::atoi(dv)); else if (srcp == &src && src.io_prefetch()) lookahead.set_depth(2); - std::fprintf(stderr, "strata generate: routing-aware prefetch of the file tier on (the next layer's router)\n"); + std::fprintf(stderr, "strata generate: routing-aware prefetch on (the next layer's router%s)\n", + fs_ahead ? ", feeding the Foresight swap space" : ", file tier"); } else { (void) cudaGetLastError(); std::fprintf(stderr, "strata generate: routing-aware prefetch off (%s)\n",