[PR #4156] [CLOSED] [Engine] gfx906: map the stream-priority calls in the HIP compat layer #4927

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4156
Author: @KevinX8
Created: 10/25/2026
Status: ❌ Closed

Base: main ← Head: gfx906-stream-priority-shim


📝 Commits (1)

  • 975e6ae [Engine] gfx906: map cudaStreamCreateWithPriority / cudaDeviceGetStreamPriorityRange in the HIP compat layer

📊 Changes

1 file changed (+2 additions, -0 deletions)

View changed files

📝 include/strata/platform/hip_compat/strata_hip.h (+2 -0)

📄 Description

Problem and result: since 0.2.3 (the DFlash2 drafter), the gfx906 build (-DSTRATA_HIP_GFX906=ON) stops at src/core/dflash2.cpp:

error: use of undeclared identifier 'cudaDeviceGetStreamPriorityRange'; did you mean 'hipDeviceGetStreamPriorityRange'?
error: use of undeclared identifier 'cudaStreamCreateWithPriority'; did you mean 'hipStreamCreateWithPriority'?

That build compiles the CUDA sources through include/strata/platform/hip_compat/, which does not map these two names, and dflash2.cpp takes its CUDA branch there (STRATA_USE_HIP is not defined in the gfx906 build). With the two #defines the build completes.

Approach: the same one-line mapping the shim already has for cudaStreamCreate / cudaStreamCreateWithFlags, to hipStreamCreateWithPriority / hipDeviceGetStreamPriorityRange. Only the gfx906 build includes this header.

Validation:

  • Passed: this branch (975e6ae4), Linux, ROCm 10.1 clang, cmake -DSTRATA_ENABLE_CUDA=ON -DSTRATA_ENABLE_HIP=OFF -DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx906 -DSTRATA_PORTABLE=ON -DSTRATA_NATIVE_EXPERTS=ON -DSTRATA_Q6K_EXPERTS=ON -DSTRATA_MMQ_KQUANTS=ON, ninja strata: builds. At v0.2.4 and v0.2.6 without the change: the error above.
  • Passed: the engine built this way serves Swift 1.5 (Qwen3.8-Flash-Next GSQ-RCO IQ3_S) on an Instinct MI50 16 GB through serve/server.py (tool calls correct; days of use on 0.2.4 and 0.2.6).
  • Passed: strata generate --draft dflash2 --draft-model <pack> (the code this lets compile) runs on the MI50.
  • Not run: other backends — the header is included by the gfx906 build only.

Limits: none known.


🔄 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/4156 **Author:** [@KevinX8](https://github.com/KevinX8) **Created:** 10/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `gfx906-stream-priority-shim` --- ### 📝 Commits (1) - [`975e6ae`](https://github.com/Niko1221/Strata/commit/975e6ae4f4e74d39e2cb636b6c346dbf49dd2551) [Engine] gfx906: map cudaStreamCreateWithPriority / cudaDeviceGetStreamPriorityRange in the HIP compat layer ### 📊 Changes **1 file changed** (+2 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `include/strata/platform/hip_compat/strata_hip.h` (+2 -0) </details> ### 📄 Description **Problem and result:** since 0.2.3 (the DFlash2 drafter), the gfx906 build (`-DSTRATA_HIP_GFX906=ON`) stops at `src/core/dflash2.cpp`: ``` error: use of undeclared identifier 'cudaDeviceGetStreamPriorityRange'; did you mean 'hipDeviceGetStreamPriorityRange'? error: use of undeclared identifier 'cudaStreamCreateWithPriority'; did you mean 'hipStreamCreateWithPriority'? ``` That build compiles the CUDA sources through `include/strata/platform/hip_compat/`, which does not map these two names, and `dflash2.cpp` takes its CUDA branch there (`STRATA_USE_HIP` is not defined in the gfx906 build). With the two `#define`s the build completes. **Approach:** the same one-line mapping the shim already has for `cudaStreamCreate` / `cudaStreamCreateWithFlags`, to `hipStreamCreateWithPriority` / `hipDeviceGetStreamPriorityRange`. Only the gfx906 build includes this header. **Validation:** - Passed: this branch (975e6ae4), Linux, ROCm 10.1 clang, `cmake -DSTRATA_ENABLE_CUDA=ON -DSTRATA_ENABLE_HIP=OFF -DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx906 -DSTRATA_PORTABLE=ON -DSTRATA_NATIVE_EXPERTS=ON -DSTRATA_Q6K_EXPERTS=ON -DSTRATA_MMQ_KQUANTS=ON`, `ninja strata`: builds. At v0.2.4 and v0.2.6 without the change: the error above. - Passed: the engine built this way serves Swift 1.5 (Qwen3.8-Flash-Next GSQ-RCO IQ3_S) on an Instinct MI50 16 GB through `serve/server.py` (tool calls correct; days of use on 0.2.4 and 0.2.6). - Passed: `strata generate --draft dflash2 --draft-model <pack>` (the code this lets compile) runs on the MI50. - Not run: other backends — the header is included by the gfx906 build only. **Limits:** none known. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:31:24 +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#4927
No description provided.