mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4902] [Engine] build the Q5_0 parity checks on HIP as well as CUDA #5241
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#5241
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/4902
Author: @sdroege
Created: 11/1/2026
Status: 🔄 Open
Base:
main← Head:hip-q5-parity-tests📝 Commits (1)
e553344hip: build the Q5_0 parity checks on HIP as well as CUDA📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
CMakeLists.txt(+1 -1)📄 Description
Problem and result
ple_q5_parityandq5_projection_parityare #296's real-weight checks for the OrcaRouter Q4_K_S files (docs/ORCA_Q4_K_S.md). Both programs are written against the portable kernel layer and link${_strata_gpu_runtime_target}, so they build and run unchanged on HIP, but the CMake condition kept them to CUDA:On an AMD box they could not be built at all, so the Q5_0 PLE reader and the Q5_1 projection had no way to be checked against real weights there.
After the change the condition is
(STRATA_ENABLE_CUDA OR STRATA_ENABLE_HIP) AND STRATA_BUILD_TESTS, the same form the other GPU test targets in this file already use.Related discussion
none
Approach
One line in
CMakeLists.txt. TheORadds a backend; the CUDA path is unchanged. Nothing outside the test targets is affected: they are only built withSTRATA_BUILD_TESTS=ONand are not part of a release.Validation
Passed:
-DSTRATA_ENABLE_HIP=ON -DSTRATA_BUILD_TESTS=ON): both targets compile and link. The tree I built in has the sameCMakeLists.txtas this branch and the same test sources;git diff origin/main -- CMakeLists.txt src/kernels/ple_q5_parity.cpp src/kernels/q5_projection_parity.cppshows only this one line.LD_LIBRARY_PATH=/opt/rocm/lib ./build-hip/ple_q5_parity Qwen3.8-Flash-Next-Uncensored-Q4_K_M-00001-of-00003.gguf->Q5_0 PLE, mapped reader: 320001536 rows, max_abs 0.000e+00 PASSandQ5_0 PLE, direct reader: 320001536 rows, max_abs 0.000e+00 PASS.LD_LIBRARY_PATH=/opt/rocm/lib ./build-hip/ple_q5_parity Qwen3.8-Flash-Next-Uncensored-Q4_K_S-00001-of-00003.gguf-> the same result, both readers PASS on the file #296 is about.LD_LIBRARY_PATH=/opt/rocm/lib ./build-hip/q5_projection_parity Qwen3.8-Flash-Next-Uncensored-Q4_K_S-00001-of-00003.gguf->Q5_1 projection: 2560 elements, max_abs 0.000e+00, bf16 differences 0 PASS.Failed:
Not run:
Limits
Test targets only, no engine code.
q5_projection_parityneeds a file whoseblk.0.ffn_down_shexp.weightis Q5_1, which the Q4_K_M file is not (its layer 0 shared down is Q8_0), so that check ran on the Q4_K_S file only. Both files carry the same Q5_0 PLE table, sople_q5_parityran on both. The checks still need a real OrcaRouter file, which is a large download (three shards).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.