[Bf-blender-cvs] [af7dd995880] blender-v3.3-release: Fix T102018: find HIP library also in system library paths on Linux

Brecht Van Lommel noreply at git.blender.org
Mon Nov 28 14:21:54 CET 2022


Commit: af7dd995880dcc88f9e590e12cda20b385471910
Author: Brecht Van Lommel
Date:   Tue Nov 1 15:34:12 2022 +0100
Branches: blender-v3.3-release
https://developer.blender.org/rBaf7dd995880dcc88f9e590e12cda20b385471910

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