Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use canonicalized name for dlopen'd libraries (libcufile) #13210

Merged
merged 4 commits into from
Apr 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion cpp/src/io/utilities/file_io_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,22 @@ void cufile_shim::modify_cufile_json() const

void cufile_shim::load_cufile_lib()
{
cf_lib = dlopen("libcufile.so", RTLD_LAZY | RTLD_LOCAL | RTLD_NODELETE);
for (auto&& name : {"libcufile.so.0",
// Prior to CUDA 11.7.1, although ABI
// compatibility was maintained, some (at least
// Debian) packages do not have the .0 symlink,
// instead request the exact version.
"libcufile.so.1.3.0" /* 11.7.0 */,
"libcufile.so.1.2.1" /* 11.6.2, 11.6.1 */,
"libcufile.so.1.2.0" /* 11.6.0 */,
"libcufile.so.1.1.1" /* 11.5.1 */,
"libcufile.so.1.1.0" /* 11.5.0 */,
"libcufile.so.1.0.2" /* 11.4.4, 11.4.3, 11.4.2 */,
"libcufile.so.1.0.1" /* 11.4.1 */,
"libcufile.so.1.0.0" /* 11.4.0 */}) {
cf_lib = dlopen(name, RTLD_LAZY | RTLD_LOCAL | RTLD_NODELETE);
if (cf_lib != nullptr) break;
}
CUDF_EXPECTS(cf_lib != nullptr, "Failed to load cuFile library");
driver_open = reinterpret_cast<decltype(driver_open)>(dlsym(cf_lib, "cuFileDriverOpen"));
CUDF_EXPECTS(driver_open != nullptr, "could not find cuFile cuFileDriverOpen symbol");
Expand Down