-
Notifications
You must be signed in to change notification settings - Fork 77
Make IB more configurable #703
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |||||||||
| #include <dlfcn.h> | ||||||||||
|
|
||||||||||
| #include <memory> | ||||||||||
| #include <mscclpp/env.hpp> | ||||||||||
|
|
||||||||||
| #include "logger.hpp" | ||||||||||
|
|
||||||||||
|
|
@@ -15,12 +16,19 @@ static std::unique_ptr<void, int (*)(void*)> globalIBVerbsHandle(nullptr, &::dlc | |||||||||
|
|
||||||||||
| void* IBVerbs::dlsym(const std::string& symbol, bool allowReturnNull) { | ||||||||||
| if (!globalIBVerbsHandle) { | ||||||||||
| const char* possibleLibNames[] = {"libibverbs.so", "libibverbs.so.1", nullptr}; | ||||||||||
| for (int i = 0; possibleLibNames[i] != nullptr; i++) { | ||||||||||
| void* handle = ::dlopen(possibleLibNames[i], RTLD_NOW); | ||||||||||
| if (mscclpp::env()->ibvSo != "") { | ||||||||||
| void* handle = ::dlopen(mscclpp::env()->ibvSo.c_str(), RTLD_NOW); | ||||||||||
| if (handle) { | ||||||||||
| globalIBVerbsHandle.reset(handle); | ||||||||||
|
||||||||||
| globalIBVerbsHandle.reset(handle); | |
| globalIBVerbsHandle.reset(handle); | |
| } else { | |
| WARN(NET, "Failed to load custom libibverbs library specified by MSCCLPP_IBV_SO ('", mscclpp::env()->ibvSo, "'): ", std::string(::dlerror())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The naming convention is inconsistent: the C++ struct uses camelCase (deviceIndex, gidIndex) but the Python property names use snake_case (ib_device_index, ib_gid_index). While the def_rw attributes correctly use camelCase to match the C++ members, the def_prop_rw properties add an "ib_" prefix and use snake_case. This creates two different ways to access the same fields in Python, which could be confusing. Consider using a consistent naming convention.