Pull requests / #873

#873 Fix first-kernel-launch crash on Windows (ROCm/Adrenalin WDDM startup race)

closed · @unimo-chan · 0 Kommentare · Auf GitHub

AMD / HIPNVIDIA / CUDAWindows

Beschreibung

**Problem**
On Windows with an AMD card (gfx1100, Adrenalin driver), the ROCm runtime can race the WDDM driver at startup. When it loses the race, `hipMemGetInfo` fails and the engine crashed at the first kernel launch (`0xC0000005` in `amdhip64_7.dll`).

**Fix**
- `device.cu`: `mem_get_info()` now retries `hipMemGetInfo` a few times (giving the driver time to settle); if it still fails it returns the error cleanly instead of crashing. The Windows/HIP path in `device_info()` uses this retrying `mem_get_info` instead of `cudaMemGetInfo`.
- `device_main.cpp`: device init + selftest are wrapped in a retry loop (5 attempts) so a transient startup failure recovers.

**Verified**
selftest 5/5, server + chat OK, no first-kernel-launch crash on a RX 7900 XT / Adrenalin 32.0.32015.

Mehr auf der Site

Links zu Install, Modellen, Releases.