Fix #109562: Cycles HIP device not found on Debian

Try loading ROCm 5.x libraries specifically, as the .so without version
is only part of the development package.

Thanks to Lee Ringham investigating and proposing this solution.
This commit is contained in:
Brecht Van Lommel
2023-07-04 14:21:34 +02:00
parent 38cc2e2f72
commit 2ee0c23a82

View File

@@ -238,7 +238,10 @@ static int hipewHipInit(void) {
/* Default installation path. */
const char *hip_paths[] = {"", NULL};
#else
const char *hip_paths[] = {"libamdhip64.so", "/opt/rocm/hip/lib/libamdhip64.so", NULL};
const char *hip_paths[] = {"libamdhip64.so.5",
"/opt/rocm/hip/lib/libamdhip64.so.5",
"libamdhip64.so",
"/opt/rocm/hip/lib/libamdhip64.so", NULL};
#endif
static int initialized = 0;
static int result = 0;