[PR #5233] [Engine] gfx906 builds again: map the DFlash2 stream-priority calls in the HIP compat layer #5357

Open
opened 2026-11-07 16:34:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/5233
Author: @zhuoran
Created: 11/4/2026
Status: 🔄 Open

Base: main ← Head: gfx906-dflash2-compat


📝 Commits (1)

  • 4aec09b gfx906 (HIP wave64) builds again: the DFlash2 drafter calls cudaStreamCreateWithPriority and cudaDeviceGetStreamPriorityRange, which the HIP compat layer did not map; map them to hipStreamCreateWithPriority and hipDeviceGetStreamPriorityRange

📊 Changes

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

View changed files

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

📄 Description

The problem. Since the DFlash2 drafter landed (0.2.10), the gfx906 (HIP wave64) build 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'?

The result. With the two mappings added, gfx906 builds again and the engine serves as before.

The approach. Two #defines in include/strata/platform/hip_compat/strata_hip.h, next to the existing cudaStreamCreate mapping. The HIP functions take the same arguments.

Validation.

  • Passed: every target compiles for gfx906 (-DSTRATA_HIP_GFX906=ON, 159/159 targets, ROCm 7.14 community image, AMD clang 23). The engine (0.1.56) serves end to end on 2x Instinct MI50 32 GB (Qwen3.8-Flash-Next GSQ-RCO IQ3_XXS, 262144 context, all 24576 expert pairs resident in VRAM): a knowledge smoke answer is correct and decode is 52-70 tok/s, the same as the 0.1.47 engine on the same machine.
  • Not run: the CUDA and SYCL builds (this compat header is included only by the gfx906 build path) and the DFlash2 drafter itself (this machine serves with the MTP drafter).

Limits. The mappings cover the signatures only; DFlash2's stream priorities have not been measured on gfx906 hardware.


🔄 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/5233 **Author:** [@zhuoran](https://github.com/zhuoran) **Created:** 11/4/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `gfx906-dflash2-compat` --- ### 📝 Commits (1) - [`4aec09b`](https://github.com/Niko1221/Strata/commit/4aec09b9f3482893a9fb4c046ae9551667a74d86) gfx906 (HIP wave64) builds again: the DFlash2 drafter calls cudaStreamCreateWithPriority and cudaDeviceGetStreamPriorityRange, which the HIP compat layer did not map; map them to hipStreamCreateWithPriority and hipDeviceGetStreamPriorityRange ### 📊 Changes **1 file changed** (+3 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `include/strata/platform/hip_compat/strata_hip.h` (+3 -0) </details> ### 📄 Description **The problem.** Since the DFlash2 drafter landed (0.2.10), the gfx906 (HIP wave64) build 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'? **The result.** With the two mappings added, gfx906 builds again and the engine serves as before. **The approach.** Two `#define`s in `include/strata/platform/hip_compat/strata_hip.h`, next to the existing `cudaStreamCreate` mapping. The HIP functions take the same arguments. **Validation.** - Passed: every target compiles for gfx906 (`-DSTRATA_HIP_GFX906=ON`, 159/159 targets, ROCm 7.14 community image, AMD clang 23). The engine (0.1.56) serves end to end on 2x Instinct MI50 32 GB (Qwen3.8-Flash-Next GSQ-RCO IQ3_XXS, 262144 context, all 24576 expert pairs resident in VRAM): a knowledge smoke answer is correct and decode is 52-70 tok/s, the same as the 0.1.47 engine on the same machine. - Not run: the CUDA and SYCL builds (this compat header is included only by the gfx906 build path) and the DFlash2 drafter itself (this machine serves with the MTP drafter). **Limits.** The mappings cover the signatures only; DFlash2's stream priorities have not been measured on gfx906 hardware. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#5357
No description provided.