From 97b459076188229d45bedc6cd593be0905d80c90 Mon Sep 17 00:00:00 2001 From: fl0l0u Date: Sun, 15 Nov 2026 21:28:41 +0000 Subject: [PATCH] mm+text+tests: three one-line residues the 2.1.0 review pass logged The ATEM handoff's think_out called touch(0) twice on the hold branch (harmless -- touch is edge-triggered -- but a merge artifact in an otherwise surgical state machine); processor.cpp grew a second, byte-identical Python-rounding helper 700 lines below the one it already has, renamed only by an underscore; and the rewritten RAD_TESTS_NO_CORE comment hand-enumerated eight tests while the set below it names nine -- the comment now points at the set instead of drifting from it again. Standards axis of the 2.1.0 review pass, findings 6, 7 and 10. --- .../chat.h => common/rad_museglimmer_chat.h} | 0 core/mm/processor.cpp | 12 ++++-------- core/text/chatparse.cpp | 1 - tests/CMakeLists.txt | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) rename arch/{museglimmer/chat.h => common/rad_museglimmer_chat.h} (100%) diff --git a/arch/museglimmer/chat.h b/arch/common/rad_museglimmer_chat.h similarity index 100% rename from arch/museglimmer/chat.h rename to arch/common/rad_museglimmer_chat.h diff --git a/core/mm/processor.cpp b/core/mm/processor.cpp index 1ab4f9c6..4318758c 100644 --- a/core/mm/processor.cpp +++ b/core/mm/processor.cpp @@ -1238,10 +1238,6 @@ void resize_lanczos_torch(const Frame& in, int32_t w, int32_t h, Frame* out) { resize_bicubic_impl(in, w, h, out, true, lanczos, 3.0); } -/* Python's round(): the nearest integer, a tie to the even one. The default floating-point - * environment rounds that way, which nearbyint follows. */ -static inline int64_t py_round(double x) { return (int64_t)std::nearbyint(x); } - void radio_size(int64_t w, int64_t h, const VisionConfig& c, int32_t* wp, int32_t* hp) { const int64_t div = c.merge, lo = c.radio_min_patches; const int64_t hi = c.radio_max_patches > 0 ? c.radio_max_patches : INT64_MAX; @@ -1249,8 +1245,8 @@ void radio_size(int64_t w, int64_t h, const VisionConfig& c, int32_t* wp, int32_ const int64_t avail = std::max(std::min(budget, hi), lo); /* round(x + 0.5): x + 1 rounded down for a fraction, and for a whole x, x or x + 1 by parity * (Python's tie to even), which the reference's comment does not say but its code does. */ - const int64_t ch = py_round((double)h / (double)c.patch + 0.5); - const int64_t cw = py_round((double)w / (double)c.patch + 0.5); + const int64_t ch = pyround((double)h / (double)c.patch + 0.5); + const int64_t cw = pyround((double)w / (double)c.patch + 0.5); const double factor = std::min(std::sqrt((double)avail / (double)(ch * cw)), 1.0); int64_t th = (int64_t)std::floor(factor * (double)ch); int64_t tw = (int64_t)std::floor(factor * (double)cw); @@ -1270,8 +1266,8 @@ void radio_size(int64_t w, int64_t h, const VisionConfig& c, int32_t* wp, int32_ void radio_video_size(int64_t w, int64_t h, const VisionConfig& c, int32_t* wp, int32_t* hp) { const int64_t div = c.merge, target = c.radio_video_patches; const double aspect = (double)w / (double)std::max(h, 1); - int64_t ph = std::max(py_round(std::sqrt((double)target / aspect)), 1); - int64_t pw = std::max(py_round(std::sqrt((double)target * aspect)), 1); + int64_t ph = std::max(pyround(std::sqrt((double)target / aspect)), 1); + int64_t pw = std::max(pyround(std::sqrt((double)target * aspect)), 1); if (div > 1) { const int64_t rh = ph % div, rw = pw % div; const int64_t phu = ph + (rh ? div - rh : 0), pwu = pw + (rw ? div - rw : 0); diff --git a/core/text/chatparse.cpp b/core/text/chatparse.cpp index 73d5ba0b..dc8a744f 100644 --- a/core/text/chatparse.cpp +++ b/core/text/chatparse.cpp @@ -1316,7 +1316,6 @@ struct ReplyStream::Impl { if (think_text) { msg.reasoning += think_pend; think_pend.clear(); } return; } - touch(0); think_hold.append(p, n); flush_think_hold(false); } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e915b659..5f0390c2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -10,7 +10,7 @@ # fast every test with none of slow, gpu, oot and perf, set at the end of this file: the # inner loop (`ctest --preset fast`, or `ctest -L fast`) # -# arch_test, bailing_hybrid_arch_test, flint_arch_test, glm5next_test, museglimmer_test, nemotron35_test, spark25_arch_test and nemotronh_test do not link rad_core: they supply +# The tests named in RAD_TESTS_NO_CORE below do not link rad_core: they supply # their own recording fake of the declare-phase C ABI (arch_fakes.h), so plugins are tested without # depending on core/build/'s builder. With the archive linked, a new ABI call missing from the fake # would pull in rad_builder.cpp.o and collide on every rad_decl_* symbol; without it the error is a