[GH-ISSUE #5323] [Engine] test_hip_ordinal fails on a Linux host whose KFD node 0 is an integrated Radeon #3175

Open
opened 2026-11-07 14:38:39 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @KTKR-DSK on GitHub (Nov 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5323

Area

[Engine] (speed, kernels, models, the server and API)

Desktop app, Terminal or source?

Source (START-HERE.bat, setup.sh or a build)

What happened

serve.test_server.GpuChoice.test_hip_ordinal fails on a Linux computer whose KFD node 0 is an integrated Radeon:

FAIL: test_hip_ordinal (serve.test_server.GpuChoice.test_hip_ordinal)
  File "serve/test_server.py", line 1992, in test_hip_ordinal
    self.assertEqual(child_env({"backend": "hip", "gpu": [1, 0], "hip_ordinal": 2})["HIP_VISIBLE_DEVICES"],
AssertionError: '0,1' != '1,0'

For that case hip_visible() returns ordered_gpus(cfg), which calls the real hip_gpu_archs() when no scores are injected. Here it returns {0: 'gfx1151'}, so the iGPU-first rule in ordered_gpus() moves card 0 to the front and the result is 0,1. The server behaves as designed; the test reads the host's KFD topology.

Patching only hip_gpu_archs to return None makes the test pass; patching only gpu_speed_scores does not. Expected: the test gives the same result on any computer, for example by patching hip_gpu_archs in the test or by using "gpu_order": "as_given" for the layer-split case.

The same failure appeared on 0.2.9, 0.2.10 and 0.2.11 on this computer. All other tests in the run passed or were skipped (0.2.11: 633 run, 630 passed, 2 skipped, this 1 failed).

Smallest steps or command that reproduce it

python -m unittest serve.test_server.GpuChoice.test_hip_ordinal

on a Linux computer where /sys/class/kfd/kfd/topology/nodes lists an integrated Radeon as node 0.

Reproduction status

Reproduced locally

Strata version

Strata 0.2.11 · engine 0.1.57 (source tree at commit c3b3f50)

Graphics card, memory and system

AMD Ryzen AI MAX+ 395 with Radeon 8060S (gfx1151), 128 GB RAM, plus 2 x NVIDIA GeForce RTX 5060 Ti 16 GB · Ubuntu 26.04.1 LTS, kernel 7.0 · Python 3.12

Model, size and settings

Not relevant (unit test, no model).

Logs

The assertion above is the complete failure output.

Originally created by @KTKR-DSK on GitHub (Nov 5, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5323 ### Area [Engine] (speed, kernels, models, the server and API) ### Desktop app, Terminal or source? Source (START-HERE.bat, setup.sh or a build) ### What happened `serve.test_server.GpuChoice.test_hip_ordinal` fails on a Linux computer whose KFD node 0 is an integrated Radeon: ``` FAIL: test_hip_ordinal (serve.test_server.GpuChoice.test_hip_ordinal) File "serve/test_server.py", line 1992, in test_hip_ordinal self.assertEqual(child_env({"backend": "hip", "gpu": [1, 0], "hip_ordinal": 2})["HIP_VISIBLE_DEVICES"], AssertionError: '0,1' != '1,0' ``` For that case `hip_visible()` returns `ordered_gpus(cfg)`, which calls the real `hip_gpu_archs()` when no scores are injected. Here it returns `{0: 'gfx1151'}`, so the iGPU-first rule in `ordered_gpus()` moves card 0 to the front and the result is `0,1`. The server behaves as designed; the test reads the host's KFD topology. Patching only `hip_gpu_archs` to return `None` makes the test pass; patching only `gpu_speed_scores` does not. Expected: the test gives the same result on any computer, for example by patching `hip_gpu_archs` in the test or by using `"gpu_order": "as_given"` for the layer-split case. The same failure appeared on 0.2.9, 0.2.10 and 0.2.11 on this computer. All other tests in the run passed or were skipped (0.2.11: 633 run, 630 passed, 2 skipped, this 1 failed). ### Smallest steps or command that reproduce it ``` python -m unittest serve.test_server.GpuChoice.test_hip_ordinal ``` on a Linux computer where `/sys/class/kfd/kfd/topology/nodes` lists an integrated Radeon as node 0. ### Reproduction status Reproduced locally ### Strata version Strata 0.2.11 · engine 0.1.57 (source tree at commit c3b3f50) ### Graphics card, memory and system AMD Ryzen AI MAX+ 395 with Radeon 8060S (gfx1151), 128 GB RAM, plus 2 x NVIDIA GeForce RTX 5060 Ti 16 GB · Ubuntu 26.04.1 LTS, kernel 7.0 · Python 3.12 ### Model, size and settings Not relevant (unit test, no model). ### Logs The assertion above is the complete failure output.
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#3175
No description provided.