Skip to content

Add functions for resource binding verification to librrun#972

Merged
rapids-bot[bot] merged 21 commits intorapidsai:mainfrom
pentschev:move-resource-binding-checking-to-librrun
Apr 17, 2026
Merged

Add functions for resource binding verification to librrun#972
rapids-bot[bot] merged 21 commits intorapidsai:mainfrom
pentschev:move-resource-binding-checking-to-librrun

Conversation

@pentschev
Copy link
Copy Markdown
Member

RapidsMPF currently includes a CLI tool check_resource_binding for live detection of hardware resource bindings. This functionality can also be useful as a library so that other projects can programmatically retrieve the information, thus move the implementation to librrun and adapt the tool to reuse that.

Additionally, make optional use of that verification in bind() functions, to strengthen resource binding confidence.

@pentschev pentschev self-assigned this Apr 16, 2026
@pentschev pentschev added feature request New feature or request non-breaking Introduces a non-breaking change labels Apr 16, 2026
@pentschev pentschev requested review from a team as code owners April 16, 2026 19:54
Comment thread python/rapidsmpf/rapidsmpf/rrun/rrun.pyx Outdated
Comment thread cpp/include/rrun/rrun.hpp
Comment on lines +90 to +102
/**
* @brief Obtain the expected binding for a GPU from pre-discovered topology.
*
* Looks up @p gpu_id in @p topology and returns the expected CPU affinity,
* memory binding, and network devices.
*
* @param topology Pre-discovered system topology.
* @param gpu_id GPU device index to look up.
* @return The expected binding, or `std::nullopt` if @p gpu_id is not found.
*/
std::optional<expected_binding> get_expected_binding(
cucascade::memory::system_topology_info const& topology, int gpu_id
);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is currently not exposed to Python because cuCascade has no Python bindings. If we find a proper use case for this we can review this decision and add bindings ourselves.

Comment thread python/rapidsmpf/rapidsmpf/rrun/rrun.pyx Outdated
Comment thread cpp/include/rrun/rrun.hpp
Comment thread cpp/src/rrun/rrun.cpp Outdated
Copy link
Copy Markdown
Member

@madsbk madsbk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pentschev

@pentschev
Copy link
Copy Markdown
Member Author

Thanks Mads!

@pentschev
Copy link
Copy Markdown
Member Author

/merge

@rapids-bot rapids-bot bot merged commit 7f5c77c into rapidsai:main Apr 17, 2026
66 checks passed
@pentschev pentschev deleted the move-resource-binding-checking-to-librrun branch April 17, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request New feature or request non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants