Dynamic Loading IB verbs#253
Open
AtlantaPepsi wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces an IBV_DIRECT build/runtime switch intended to support resolving libibverbs symbols either via direct linkage or via dlopen/dlsym, and adds a runtime check to block NIC executor usage when verbs aren’t available.
Changes:
- Added
IBV_DIRECTmode plumbing (Makefile + CMake option) to toggle direct symbol binding vsdlsymresolution. - Introduced
pfn_*function pointers and updated some verbs call sites/macros to call through them. - Added
System::IbvLoaded()and a guard to error out when NIC executor is requested but verbs aren’t loaded.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| src/header/TransferBench.hpp | Adds libibverbs dynamic-loading infrastructure (pfn_*, Ibvdl()), runtime loaded-state tracking, and uses pfn_* in some verbs calls. |
| Makefile | Adds DISABLE_IBV_DIRECT flag and sets -DIBV_DIRECT=1 by default when NIC exec is enabled. |
| CMakeLists.txt | Adds ENABLE_IBV_DIRECT option and defines IBV_DIRECT=1 when enabled. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
|
i'd say just merge into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Technical Details
third-party/folder for ibverbs related files. Will also harbor future external source which TransferBench dependsIbvHeader.hppfor ib verbs structs andIbvDynLoad.hppfor dynamic loading and status report for ib verbs functionality.HAVE_DMABUF_SUPPORTmacro. Got rid of redundant dependency check on hsa header and rocr binaries (they are mandatory for AMD platform) in build process. Similar to ibv, it now dynamically checks forhsa_amd_portable_export_dmabufsymbol as part of check kernel support, and returns dmabuf support in runtime.Test Plan
Test Result
Submission Checklist