mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1260] [CLOSED] tests: order MMQ parity transfers on the compute stream #3339
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3339
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1260
Author: @mcuygjsliy429
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:fix/mmq-test-stream-order📝 Commits (1)
f444003tests: order MMQ parity transfers on the compute stream📊 Changes
2 files changed (+27 additions, -12 deletions)
View changed files
📝
CMakeLists.txt(+3 -2)📝
tests/cuda/prefill_mmq_kquant_test.cpp(+24 -10)📄 Description
Summary
Test-only fix for the same synchronization issue reported in #532. That PR was closed during the history rewrite; this branch starts from the current
main(82f46a8c). Instead of adding a device-wide barrier, keep each test product's transfers and compute on its existing non-blocking stream.prefill_mmq_kquant_testcurrently uploads pageable buffers and initializes the NaN sentinel on the default stream, then launches kernels oncudaStreamNonBlocking. The two streams have no ordering guarantee. A pageable H2D copy may return before its final DMA completes, and the device memset is host-asynchronous. See NVIDIA's API synchronization and stream synchronization documentation.Changes
s; synchronize it before inspecting host results.--stress-default-streamand a second CTest entry. A short host callback adds unrelated default-stream work while the product usess; this is scheduling stress, not a claim that every unsynchronized run must fail.{0,1,0,3,0},{1,7,8,9},{1,127,1}.Threads::Threadsfor the callback's sleep. Use the default-stream null handle, which the existing gfx906 HIP compatibility path also accepts.No inference code, quantizers, reference math or numerical thresholds change.
Validation
Linux, GCC 13.3, CUDA 12.8; RTX 3090 (sm_86) and RTX 4080 SUPER (sm_89):
STRATA_ENABLE_CUDA=ON,STRATA_BUILD_TESTS=ON,STRATA_MMQ_KQUANTS=ON,STRATA_Q6K_EXPERTS=ON, and architectures86;89.3cf03257f219afbe7334045ff7c6a06ac68c627d. The adapter source/header match current main byte-for-byte. This was not a full engine rebuild.git diff --checkpassed. The serving engine was not restarted or replaced.To run the two registered tests in a built CUDA/Q6 test tree:
Separate limitation
During earlier investigation, Compute Sanitizer also reported tail row-ID reads past the allocation in the pinned ggml MMQ kernel, independently of this test-stream race. This PR does not fix that dependency issue or claim a sanitizer-clean engine. Clean sanitizer and full-model results obtained with an additional private kernel patch are deliberately not attributed to this test-only PR.
AI-assisted implementation and validation, submitted with the operator's authorization.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.