[Bf-blender-cvs] [f66236a827c] master: Fix T102018: find HIP library also in system library paths on Linux

Brecht Van Lommel noreply at git.blender.org
Tue Nov 1 18:36:52 CET 2022


Commit: f66236a827c82bffd9f31ca2a7919e865a0397e0
Author: Brecht Van Lommel
Date:   Tue Nov 1 15:34:12 2022 +0100
Branches: master
https://developer.blender.org/rBf66236a827c82bffd9f31ca2a7919e865a0397e0

Fix T102018: find HIP library also in system library paths on Linux

Previously it would use a hardcoded location where the AMD driver installs it,
but Linux distributions may use other locations. Now look for both cases.

===================================================================

M	extern/hipew/src/hipew.c

===================================================================

diff --git a/extern/hipew/src/hipew.c b/extern/hipew/src/hipew.c
index ecf952e266f..7cafe7727f5 100644
--- a/extern/hipew/src/hipew.c
+++ b/extern/hipew/src/hipew.c
@@ -253,7 +253,7 @@ static int hipewHipInit(void) {
   /* Default installation path. */
   const char *hip_paths[] = {"", NULL};
 #else
-  const char *hip_paths[] = {"/opt/rocm/hip/lib/libamdhip64.so", NULL};
+  const char *hip_paths[] = {"libamdhip64.so", "/opt/rocm/hip/lib/libamdhip64.so", NULL};
 #endif
   static int initialized = 0;
   static int result = 0;



More information about the Bf-blender-cvs mailing list