gdrcopy: fall back to the v1 pin API when the v2 pin ioctl is unsupported (gdrdrv < 2.5) - #1354
Open
dmvevents wants to merge 1 commit into
Open
gdrcopy: fall back to the v1 pin API when the v2 pin ioctl is unsupported (gdrdrv < 2.5)#1354dmvevents wants to merge 1 commit into
dmvevents wants to merge 1 commit into
Conversation
…rted On a host whose gdrdrv kernel module predates 2.5 while userspace libgdrapi is 2.5+ (a common pairing on fleet AMIs), gdr_pin_buffer_v2 resolves fine at init but the v2 pin ioctl is not recognized by the kernel and fails with EINVAL/ENOTTY at registration time. Fall back to the v1 pin API in that case instead of failing the registration; the two are identical at the gdr_mh_t output level (only the flags input differs). This composes with the OFI_NCCL_GDRCOPY_FORCED_PCIE_COPY override (aws#1351): the override asserts the capability on a min(runtime, driver) probe miss, and this fallback makes the pin path actually work on the gdrdrv-2.4 kernels that miss. Measured on a mixed 2-node p5en fleet (one gdrdrv 2.5, one 2.4, libgdrapi 2.5.2 both): with both changes, 24x 'Assigned GIN plugin' on both nodes and the DeepEP dispatch/combine correctness gate passes with zero CUDA 719 combine faults; without the fallback the 2.4 node fails registration. Refs: aws#1350 Signed-off-by: Anton Alexander <dmvevents@gmail.com>
dmvevents
force-pushed
the
feat/gdrcopy-forced-pcie-override
branch
from
August 14, 2026 17:03
01a7c40 to
b4a9ddf
Compare
dmvevents
marked this pull request as ready for review
August 14, 2026 17:20
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.
Issue #, if available: #1350
Description of changes:
Scoped down to avoid overlapping #1351 (which carries the
OFI_NCCL_GDRCOPY_FORCED_PCIE_COPYenv override and the probe unification). This PR is now only the v1 pin fallback — the second half of the #1350 fix, composing with #1351:On a host whose gdrdrv kernel module predates 2.5 while userspace
libgdrapiis 2.5+ (a common pairing on fleet AMIs),gdr_pin_buffer_v2resolves fine at init, but the v2 pin ioctl is not recognized by the kernel and fails withEINVAL/ENOTTYat registration time. This change falls back to the v1 pin API in that case instead of failing the registration; the two are identical at thegdr_mh_toutput level (only the flags input differs).Why both halves are needed (measured, mixed 2-node p5en fleet — one gdrdrv 2.5, one 2.4, libgdrapi 2.5.2 on both):
Inert everywhere the v2 ioctl works: the fallback only fires on
EINVAL/ENOTTYfrom the v2 pin call.Draft pending maintainer read on #1350/#1351 — if you'd rather fold this hunk into #1351 as one PR, happy to do that instead.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.