[PR #2183] [CLOSED] Windows HIP: dynamically resolve hipKernelNameRefByPtr and map auto PCIe mode to DMA #3907

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2183
Author: @dvasdekis
Created: 10/12/2026
Status: ❌ Closed

Base: main ← Head: fix/windows-hip-runtime


📝 Commits (1)

  • 649b504 Windows HIP: dynamically resolve hipKernelNameRefByPtr and map auto PCIe mode to DMA

📊 Changes

2 files changed (+31 additions, -4 deletions)

View changed files

📝 src/core/verify.cpp (+11 -0)
📝 src/program/generate.cpp (+20 -4)

📄 Description

Summary

Fixes two Windows HIP runtime issues:

  1. Loader crash STATUS_ENTRYPOINT_NOT_FOUND (0xC0000139):

    • src/core/verify.cpp uses hipKernelNameRefByPtr for node inspection under STRATA_VERIFY_NODES.
    • On Windows, amdhip64_7.dll (from AMD TheRock wheels / ROCm 10.2 / 7.2.4 nightly) does not export hipKernelNameRefByPtr, although the symbol exists in the import library amdhip64_7.lib.
    • As a result, strata.exe linked cleanly but terminated immediately upon execution before entering main().
    • Resolved by dynamically resolving hipKernelNameRefByPtr via GetProcAddress under _WIN32, gracefully returning nullptr if unexported.
  2. PCIe offload auto mode on Windows HIP:

    • On Windows HIP, device kernels cannot dereference host virtual memory directly (hipHostGetDevicePointer does not provide an alias).
    • --pcie-mode auto previously selected kernel mode (mode 2).
    • Added resolve_pcie_mode(), routing --pcie-mode auto to host-to-device DMA streaming (mode 0) on Windows HIP.

What it leaves alone

  • Linux HIP, CUDA, and SYCL paths are unchanged.
  • Output logits and token generation remain bit-identical.

Verification

  • Tested on Windows 11 with AMD Radeon RX 9070 XT (gfx1201), ROCm 10.2.
  • strata.exe launches normally without DLL entry point errors.
  • Verified on Qwen3.8-Flash-Next Coder IQ1_M with 15/15 passed on bench/quality_suite.py.

🔄 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/2183 **Author:** [@dvasdekis](https://github.com/dvasdekis) **Created:** 10/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/windows-hip-runtime` --- ### 📝 Commits (1) - [`649b504`](https://github.com/Niko1221/Strata/commit/649b504526262c0201b90764ea074f050f41567f) Windows HIP: dynamically resolve hipKernelNameRefByPtr and map auto PCIe mode to DMA ### 📊 Changes **2 files changed** (+31 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/core/verify.cpp` (+11 -0) 📝 `src/program/generate.cpp` (+20 -4) </details> ### 📄 Description ### Summary Fixes two Windows HIP runtime issues: 1. **Loader crash STATUS_ENTRYPOINT_NOT_FOUND (0xC0000139)**: - src/core/verify.cpp uses hipKernelNameRefByPtr for node inspection under STRATA_VERIFY_NODES. - On Windows, amdhip64_7.dll (from AMD TheRock wheels / ROCm 10.2 / 7.2.4 nightly) does not export hipKernelNameRefByPtr, although the symbol exists in the import library amdhip64_7.lib. - As a result, strata.exe linked cleanly but terminated immediately upon execution before entering main(). - Resolved by dynamically resolving hipKernelNameRefByPtr via GetProcAddress under _WIN32, gracefully returning nullptr if unexported. 2. **PCIe offload auto mode on Windows HIP**: - On Windows HIP, device kernels cannot dereference host virtual memory directly (hipHostGetDevicePointer does not provide an alias). - --pcie-mode auto previously selected kernel mode (mode 2). - Added resolve_pcie_mode(), routing --pcie-mode auto to host-to-device DMA streaming (mode 0) on Windows HIP. ### What it leaves alone - Linux HIP, CUDA, and SYCL paths are unchanged. - Output logits and token generation remain bit-identical. ### Verification - Tested on Windows 11 with AMD Radeon RX 9070 XT (gfx1201), ROCm 10.2. - strata.exe launches normally without DLL entry point errors. - Verified on Qwen3.8-Flash-Next Coder IQ1_M with 15/15 passed on bench/quality_suite.py. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:31:35 +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#3907
No description provided.