[PR #54] [MERGED] Windows HIP: build script, Linux-only CPU bench, thinking-off fix, more disk reads in flight, setenv on Windows #305

Closed
opened 2026-10-29 21:24:01 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/54
Author: @jerem91150
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @mw00

Base: main ← Head: windows-hip


📝 Commits (2)

  • 4c319a9 Windows HIP: build script, Linux-only CPU bench, thinking off closed, up to 32 disk reads in flight
  • 5b54e9b Windows: --kv int8 sets STRATA_GLM_KV_INT8 through set_env (setenv does not exist with MSVC's CRT)

📊 Changes

6 files changed (+117 additions, -7 deletions)

View changed files

📝 CMakeLists.txt (+4 -2)
📝 serve/server.py (+5 -0)
📝 src/core/glm_prefill.cu (+7 -4)
📝 src/program/generate.cpp (+1 -1)
➕ tools/hip/build_maya_windows.bat (+38 -0)
➕ tools/hip/gfx1100-glm-hipblaslt-100500.txt (+62 -0)

📄 Description

Here are the Windows HIP bits you asked for in #6, now rebased on 1.0.24 (two commits). Part of it comes from my work on Strata (the build script is adapted from Strata's tools/hip/build_windows.bat), the rest I wrote for Maya. The peer-copy names are out since they're already in 1.0.24.

What's in it:

  • tools/hip/build_maya_windows.bat to build natively on Windows with TheRock's ROCm wheels (needs ROCM_VENV pointing at the venv with rocm-sdk, VS 2022 Build Tools, Ninja; gfx1100 by default, tests turns the tests on)
  • glm_cpu_bench only built when not WIN32 (it uses pread / unistd.h)
  • the GLM hipBLASLt table for hipBLASLt 100500, tuned on my 7900 XTX from the rows of #7's table
  • server: when thinking is off and the prompt ends with an open <think>, close it. GLM-5.3's template opens it no matter what, so the answer ended up inside the think block. This one isn't HIP specific, it changes NVIDIA requests with thinking off too, happy to split it out if you'd rather.
  • STRATA_GLM_DISK_QD accepted up to 32 instead of 4. Default is still 2, so nothing changes unless you set it.
  • 1.0.24 didn't build on Windows: --kv int8 called setenv, which MSVC's CRT doesn't have. It now goes through the file's own set_env, with a getenv check to keep the no-overwrite behaviour.

Why the QD one: on Windows every read seems to have a fixed cost, so the prompt reader was stuck far below what the NVMe can do (6.5 GB/s raw). With READ_CHUNKS=1 it went from 1.66 GB/s at QD 2 to 4.27 GB/s at QD 16, and the 27K prompt from 75 s to 46-59 s. Not measured on Linux, which is why I left the default alone. I also checked it doesn't play a part in #53: that crash happened with your defaults too, and with #39 on top it's gone with both settings (0 crashes in 8 sessions, 5 in 8 before).

Tested on Windows 11, RX 7900 XTX, 64 GB RAM, ROCm 10.2.0a20260930 (hipBLASLt 100500), UD-IQ2_XXS, on 1.0.24 with #39. Builds clean. glm_hc_parity, glm_kda_parity, glm_ffn_parity, glm_dsa_parity pass, glm_model_test passes with the same numbers as before (batched-8 2.56e-06, streamed-8 0, 12-token 3.10e-06, continuation 3.10e-06), and so do sampler_parity and hip_glm_prefill_attention (hip_expert_cache_staging, hip_intrinsics, hip_native_qsa_score, hip_prefill_native_batch and glm_memory_test passed on my 1.0.16 build, I didn't rerun them on 1.0.24). hip_glm_handoff fails on Windows, before and after this PR (details in #53). I have no NVIDIA card, so the only shared-code changes (the server line and the higher QD cap) are untested there.

Small thing: glm_model_test --selftest run from the build folder exits with 0xC0000409 and no message because data/glm5-synth.gguf is relative to the working directory. From the repo root it's fine, just a "file not found" line would help.

If you end up rewriting it, could you keep me as co-author on the commit (Co-authored-by: jerem91150 175935783+jerem91150@users.noreply.github.com)? Thanks!


🔄 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/mw00/project-maya/pull/54 **Author:** [@jerem91150](https://github.com/jerem91150) **Created:** 10/9/2026 **Status:** ✅ Merged **Merged:** 10/9/2026 **Merged by:** [@mw00](https://github.com/mw00) **Base:** `main` ← **Head:** `windows-hip` --- ### 📝 Commits (2) - [`4c319a9`](https://github.com/mw00/project-maya/commit/4c319a9ea9ee8ace15b9adba65b7d07ad3a14e0d) Windows HIP: build script, Linux-only CPU bench, thinking off closed, up to 32 disk reads in flight - [`5b54e9b`](https://github.com/mw00/project-maya/commit/5b54e9b947362715335398d7b350e0671f51c78c) Windows: --kv int8 sets STRATA_GLM_KV_INT8 through set_env (setenv does not exist with MSVC's CRT) ### 📊 Changes **6 files changed** (+117 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+4 -2) 📝 `serve/server.py` (+5 -0) 📝 `src/core/glm_prefill.cu` (+7 -4) 📝 `src/program/generate.cpp` (+1 -1) ➕ `tools/hip/build_maya_windows.bat` (+38 -0) ➕ `tools/hip/gfx1100-glm-hipblaslt-100500.txt` (+62 -0) </details> ### 📄 Description Here are the Windows HIP bits you asked for in #6, now rebased on 1.0.24 (two commits). Part of it comes from my work on Strata (the build script is adapted from Strata's tools/hip/build_windows.bat), the rest I wrote for Maya. The peer-copy names are out since they're already in 1.0.24. What's in it: - tools/hip/build_maya_windows.bat to build natively on Windows with TheRock's ROCm wheels (needs ROCM_VENV pointing at the venv with rocm-sdk, VS 2022 Build Tools, Ninja; gfx1100 by default, `tests` turns the tests on) - glm_cpu_bench only built when not WIN32 (it uses pread / unistd.h) - the GLM hipBLASLt table for hipBLASLt 100500, tuned on my 7900 XTX from the rows of #7's table - server: when thinking is off and the prompt ends with an open `<think>`, close it. GLM-5.3's template opens it no matter what, so the answer ended up inside the think block. This one isn't HIP specific, it changes NVIDIA requests with thinking off too, happy to split it out if you'd rather. - STRATA_GLM_DISK_QD accepted up to 32 instead of 4. Default is still 2, so nothing changes unless you set it. - 1.0.24 didn't build on Windows: `--kv int8` called `setenv`, which MSVC's CRT doesn't have. It now goes through the file's own set_env, with a getenv check to keep the no-overwrite behaviour. Why the QD one: on Windows every read seems to have a fixed cost, so the prompt reader was stuck far below what the NVMe can do (6.5 GB/s raw). With READ_CHUNKS=1 it went from 1.66 GB/s at QD 2 to 4.27 GB/s at QD 16, and the 27K prompt from 75 s to 46-59 s. Not measured on Linux, which is why I left the default alone. I also checked it doesn't play a part in #53: that crash happened with your defaults too, and with #39 on top it's gone with both settings (0 crashes in 8 sessions, 5 in 8 before). Tested on Windows 11, RX 7900 XTX, 64 GB RAM, ROCm 10.2.0a20260930 (hipBLASLt 100500), UD-IQ2_XXS, on 1.0.24 with #39. Builds clean. glm_hc_parity, glm_kda_parity, glm_ffn_parity, glm_dsa_parity pass, glm_model_test passes with the same numbers as before (batched-8 2.56e-06, streamed-8 0, 12-token 3.10e-06, continuation 3.10e-06), and so do sampler_parity and hip_glm_prefill_attention (hip_expert_cache_staging, hip_intrinsics, hip_native_qsa_score, hip_prefill_native_batch and glm_memory_test passed on my 1.0.16 build, I didn't rerun them on 1.0.24). hip_glm_handoff fails on Windows, before and after this PR (details in #53). I have no NVIDIA card, so the only shared-code changes (the server line and the higher QD cap) are untested there. Small thing: glm_model_test --selftest run from the build folder exits with 0xC0000409 and no message because data/glm5-synth.gguf is relative to the working directory. From the repo root it's fine, just a "file not found" line would help. If you end up rewriting it, could you keep me as co-author on the commit (Co-authored-by: jerem91150 <175935783+jerem91150@users.noreply.github.com>)? Thanks! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:24:01 +07:00
Sign in to join this conversation.
No labels
pull-request
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
mw00/project-maya#305
No description provided.