SWDEV-437702 - implement hipGetProcAddress

This should be used in place of dlsym or GetProcAddress (linux and windows respectively)

Change-Id: I5501b538e03892e8e5a2282678d848fcaf21d911


[ROCm/clr commit: 0479cdb3dd]
このコミットが含まれているのは:
jiabaxie authored and Jiabao Xie committed 2024-02-08 11:26:02 -05:00
1 親 fe3c0a3fdc
コミット b251260e2a
10ファイル変更
+238 -18

検索条件に一致するファイルはありません

+23
ファイルの表示
@@ -958,4 +958,27 @@ bool PlatformState::CloseUniqueFileHandle(const std::shared_ptr<UniqueFD>& ufd)
}
return true;
}
void* PlatformState::getDynamicLibraryHandle() {
amd::ScopedLock lock(lock_);
if (dynamicLibraryHandle_ != nullptr) {
return dynamicLibraryHandle_;
}
#ifdef _WIN32
const char* libName = "amdhip64.dll";
#else
const char* libName = "libamdhip64.so";
#endif
dynamicLibraryHandle_ = amd::Os::loadLibrary(libName);
return dynamicLibraryHandle_;
}
void PlatformState::setDynamicLibraryHandle(void* handle){
amd::ScopedLock lock(lock_);
dynamicLibraryHandle_ = handle;
}
} //namespace hip