Windows AMD: the HIP runtime next to strata.exe, not an AMD driver's System32 copy (#468, #461)

Windows looks for an imported DLL in the exe's folder, then System32, then PATH (where the zip's rocm/bin is): a
driver that installs its own amdhip64_7.dll in System32 won, and the bundled rocBLAS/hipBLAS ran on that runtime - an
access violation on a W7900, hipErrorInvalidDeviceFunction on a 7900 XTX, on the first prompt. setup copies
amdhip64_7.dll and amd_comgr.dll from engine/rocm/bin next to the exes after the unzip, before the device probe and
on every start (so a 0.1.34 install is fixed too); package_windows.py ships them there; the engine and strata-device
log which runtime they loaded. rocBLAS/hipBLASLt stay in rocm/bin (their kernel libraries and .kpack are found from
there).
This commit is contained in:
Niko1221 committed 2026-10-02 09:31:18 +02:00
1 parent eb8bb8bcd9
commit a2edcb12f9
6 files changed
+89

No files matched your search

+13
View File
@@ -9,6 +9,12 @@
#include <cstdio>
#include <cstring>
#include <string>
#if defined(STRATA_USE_HIP) && defined(_WIN32)
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#endif
static std::string human(uint64_t b) {
char buf[64];
@@ -68,6 +74,13 @@ int main(int argc, char** argv) {
std::printf(" multiprocessors %d\n", d.multi_processor_count);
std::printf(" VRAM total / free %s / %s\n", human(d.total_bytes).c_str(), human(d.free_bytes).c_str());
std::printf(" driver / runtime %d / %d\n", d.driver_version, d.runtime_version);
#if defined(STRATA_USE_HIP) && defined(_WIN32)
// #468 #461: which HIP runtime this process loaded - the one beside the exe, or an AMD driver's System32 copy
if (HMODULE h = GetModuleHandleA("amdhip64_7.dll")) {
char path[MAX_PATH] = {};
if (GetModuleFileNameA(h, path, MAX_PATH) > 0) std::printf(" HIP runtime %s\n", path);
}
#endif
// The planner's view against the card's. A plan that does not fit in what is actually FREE is the
// failure this print exists to make visible at startup rather than at token 4000.