[PR #1660] [CLOSED] prefill: let native-layout packs take STRATA_MMQ_RESIDENT_SORT_NE #3590

Closed
opened 2026-11-07 15:29:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1660
Author: @ruibeikaa
Created: 10/9/2026
Status: ❌ Closed

Base: main ← Head: resident-sort-native


📝 Commits (1)

  • 820e1e0 prefill: let native-layout packs take STRATA_MMQ_RESIDENT_SORT_NE

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 src/prefill/mmq_resident_sort.hpp (+4 -1)

📄 Description

The row-count sort of a fully resident layer's experts (c6a0d403) skips native-layout packs, though slot/src/off are built the same way for both layouts and nothing reads off[e + 1] as a count. This drops that one condition; the switch stays opt-in.

Measured on 4× GP100 (2× PH402, sm_60), Swift 1.5 IQ3_XXS served native with Q8_0 dense shards, --layer-split 12,24,36, every expert resident. Switch off → on, the same build, replies identical bit for bit:

prompt read off on
1.2K fresh 7.27 s 5.32 s
1.1K appended at 35K 7.95 s 5.87 s
35K fresh 63.3 s 54.1 s

The expert GEMMs take 44% less time; nothing else moves, and decode is unchanged. Only sm_60 was checked for identical output; whether newer architectures' MMQ (stream-k) keeps the bits under the reordered groups is not measured.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1660 **Author:** [@ruibeikaa](https://github.com/ruibeikaa) **Created:** 10/9/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `resident-sort-native` --- ### 📝 Commits (1) - [`820e1e0`](https://github.com/Niko1221/Strata/commit/820e1e0aecf291524f5bd411b3bbb202c1d536ff) prefill: let native-layout packs take STRATA_MMQ_RESIDENT_SORT_NE ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/prefill/mmq_resident_sort.hpp` (+4 -1) </details> ### 📄 Description The row-count sort of a fully resident layer's experts (c6a0d403) skips native-layout packs, though slot/src/off are built the same way for both layouts and nothing reads off[e + 1] as a count. This drops that one condition; the switch stays opt-in. Measured on 4× GP100 (2× PH402, sm_60), Swift 1.5 IQ3_XXS served native with Q8_0 dense shards, `--layer-split 12,24,36`, every expert resident. Switch off → on, the same build, replies identical bit for bit: | prompt read | off | on | |---|---|---| | 1.2K fresh | 7.27 s | 5.32 s | | 1.1K appended at 35K | 7.95 s | 5.87 s | | 35K fresh | 63.3 s | 54.1 s | The expert GEMMs take 44% less time; nothing else moves, and decode is unchanged. Only sm_60 was checked for identical output; whether newer architectures' MMQ (stream-k) keeps the bits under the reordered groups is not measured. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:29:24 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3590
No description provided.