Fix HIP library detection

The code unconditionally checked `lib`, but on modern Linux distributions, 64-bit binaries are under `lib64` instead. 

Note that this might be slightly different on Debian-based distributions, but as I don't have one I can't test it.
This commit is contained in:
Luca Beltrame
2025-09-27 09:23:32 +02:00
committed by GitHub
parent e3e41298d9
commit f00486c8f3
+7 -1
View File
@@ -59,7 +59,13 @@ class ROCmEnvironment(Environment):
super().__init__(lib)
break
else:
super().__init__(os.path.join(path, "lib", "libamdhip64.so"))
# Check 64bit path first, then fall back if it doesn't exist
# FIXME: This may be brittle on Debian-based distributions
joined_path = os.path.join(path, "lib64", "libamdhip64.so")
if not os.path.exists(joined_path):
joined_path = os.path.join(path, "lib", "libamdhip64.so")
super().__init__(joined_path)
self.path = path