Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

prefill: let native-layout packs take STRATA_MMQ_RESIDENT_SORT_NE

ruibeikaadc9b21994488
diff --git a/src/prefill/mmq_resident_sort.hpp b/src/prefill/mmq_resident_sort.hpp
index 2e03856b6..c81b45624 100644
--- a/src/prefill/mmq_resident_sort.hpp
+++ b/src/prefill/mmq_resident_sort.hpp
@@ -21,7 +21,10 @@ inline bool mmq_resident_sort_requested() {
inline bool mmq_resident_sort_eligible(bool requested, bool use_mmq, bool native_layout, bool has_cache,
const int32_t* layer_resident, int64_t n_expert,
bool stream_all, bool layer_stream_empty) {
- if (!requested || !use_mmq || native_layout || !has_cache || !layer_resident || n_expert <= 0) return false;
+ // native-layout packs too: slot/src/off are built the same way for both layouts, and nothing reads off[e + 1] as a
+ // count (4x GP100, sm_60: 1.2K prompt 7.27 -> 5.32 s, 35K 63.3 -> 54.1 s, the same bits)
+ (void) native_layout;
+ if (!requested || !use_mmq || !has_cache || !layer_resident || n_expert <= 0) return false;
// All experts, including unselected ones: leave every partial/streamed layer in ID order.
if (stream_all && !layer_stream_empty) return false;
for (int64_t e = 0; e < n_expert; ++e) if (layer_resident[e] < 0) return false;