Skip to content

Commit 2dc32d6

Browse files
marbrejayhawk-commitsammallya
authored
Explicitly load versioned libamdhip64.so (#1872)
* Explicitly load versioned libamdhip64.so * Fix syntax errors * Fix when patching happens in Windows workflow --------- Co-authored-by: Joseph Macaranas <[email protected]> Co-authored-by: ammallya <[email protected]>
1 parent 2cf9faa commit 2dc32d6

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

.github/workflows/therock-ci-linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ jobs:
6666
run: |
6767
# Remove patches here if they cannot be applied cleanly, and they have not been deleted from TheRock repo
6868
# rm ./TheRock/patches/amd-mainline/rocm-systems/*.patch
69+
rm -f ./TheRock/patches/amd-mainline/rocm-systems/0006-Explicitly-load-libamdhip64.so.7.patch
6970
./TheRock/build_tools/fetch_sources.py --jobs 12 --no-include-rocm-systems --no-include-rocm-libraries --no-include-ml-frameworks
7071
7172

.github/workflows/therock-ci-windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
run: |
5555
# Remove patches here if they cannot be applied cleanly, and they have not been deleted from TheRock repo
5656
# rm ./TheRock/patches/amd-mainline/rocm-systems/*.patch
57+
rm -f ./TheRock/patches/amd-mainline/rocm-systems/0006-Explicitly-load-libamdhip64.so.7.patch
5758
git -c user.name="therockbot" -c "[email protected]" am --whitespace=nowarn ./TheRock/patches/amd-mainline/rocm-systems/*.patch
5859
5960
- name: Install requirements

projects/clr/hipamd/src/hip_comgr_helper.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,8 @@ bool RTCProgram::findIsa() {
906906
std::string dll_name = std::string("amdhip64_" + std::to_string(HIP_VERSION_MAJOR) + ".dll");
907907
libName = dll_name.c_str();
908908
#else
909-
libName = "libamdhip64.so";
909+
std::string so_name = std::string("libamdhip64.so." + std::to_string(HIP_VERSION_MAJOR));
910+
libName = so_name.c_str();
910911
#endif
911912

912913
void* handle = amd::Os::loadLibrary(libName);

projects/clr/hipamd/src/hip_platform.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,8 @@ void* PlatformState::getDynamicLibraryHandle() {
10931093
#ifdef _WIN32
10941094
const char* libName = "amdhip64.dll";
10951095
#else
1096-
const char* libName = "libamdhip64.so";
1096+
std::string so_name = std::string("libamdhip64.so." + std::to_string(HIP_VERSION_MAJOR));
1097+
const char* libName = so_name.c_str();
10971098
#endif
10981099

10991100
dynamicLibraryHandle_ = amd::Os::loadLibrary(libName);

0 commit comments

Comments
 (0)