[PR #264] [CLOSED] tests: make iq_parity reproducible from a fresh checkout #2535

Closed
opened 2026-11-04 02:01:06 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/264
Author: @j-luwierski
Created: 9/30/2026
Status: ❌ Closed

Base: main ← Head: todo24-iq-fixture


📝 Commits (1)

  • 1d45a51 tests: make iq_parity reproducible from a fresh checkout (TODO 24)

📊 Changes

3 files changed (+198 additions, -5 deletions)

View changed files

📝 CMakeLists.txt (+42 -0)
📝 src/kernels/iq_parity.cpp (+18 -5)
➕ tools/iq_fixture.py (+138 -0)

📄 Description

The i-quant fixtures were never published, so iq_parity reported ten "missing fixture" failures on any fresh tree. tools/iq_fixture.py now generates them deterministically (seeded rows/cols, RandomState) into the BUILD directory: for each of the ten types it writes the raw block bytes (sane fp16 scales at each layout's scale offsets, seeded index and sub-scale bytes) plus the gguf-py dequantized reference - gguf-py is dequant-only for the i-quants, so no quantizer is needed, and Q2_0 (the repository's type 42) uses tools/gguf_writer.py's codec. The kernel type ids in the headers match the vendored gguf-py's enum one for one. Dependencies: python3 with numpy and the vendored gguf-py - nothing is pip-installed, and CMake probes the configured interpreter and .venv, registering the tests only when a usable interpreter is found and saying so otherwise.

CTest now runs iq_parity (previously built but never registered) with the fixtures as an explicit CTest fixture: generation completes before the test even under parallel execution, and a generation failure fails the run. The missing-fixture diagnostic names both candidate files and the generating command; the nonzero exit is preserved.


🔄 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/264 **Author:** [@j-luwierski](https://github.com/j-luwierski) **Created:** 9/30/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `todo24-iq-fixture` --- ### 📝 Commits (1) - [`1d45a51`](https://github.com/Niko1221/Strata/commit/1d45a5115d0b3f7da9697440838a21baca830cd2) tests: make iq_parity reproducible from a fresh checkout (TODO 24) ### 📊 Changes **3 files changed** (+198 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+42 -0) 📝 `src/kernels/iq_parity.cpp` (+18 -5) ➕ `tools/iq_fixture.py` (+138 -0) </details> ### 📄 Description The i-quant fixtures were never published, so iq_parity reported ten "missing fixture" failures on any fresh tree. tools/iq_fixture.py now generates them deterministically (seeded rows/cols, RandomState) into the BUILD directory: for each of the ten types it writes the raw block bytes (sane fp16 scales at each layout's scale offsets, seeded index and sub-scale bytes) plus the gguf-py dequantized reference - gguf-py is dequant-only for the i-quants, so no quantizer is needed, and Q2_0 (the repository's type 42) uses tools/gguf_writer.py's codec. The kernel type ids in the headers match the vendored gguf-py's enum one for one. Dependencies: python3 with numpy and the vendored gguf-py - nothing is pip-installed, and CMake probes the configured interpreter and .venv, registering the tests only when a usable interpreter is found and saying so otherwise. CTest now runs iq_parity (previously built but never registered) with the fixtures as an explicit CTest fixture: generation completes before the test even under parallel execution, and a generation failure fails the run. The missing-fixture diagnostic names both candidate files and the generating command; the nonzero exit is preserved. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:01:06 +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#2535
No description provided.