Generated banner for Nvshmem Select Remote Transport
Generated logo for Nvshmem Select Remote Transport

Nvshmem Select Remote Transport

NVIDIAOfficialCreated by NVIDIA NVSHMEM Team

  • Skill
  • Tool integration
  • Software development
  • Apache-2.0
  • Medium risk
  • Has scripts

From the author

Select an NVSHMEM remote transport from target system and kernel evidence. Use for inter-node selection, compatibility checks, or configuration.
— the description by NVIDIA NVSHMEM Team

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured workflow to select the optimal NVSHMEM remote transport configuration. It relies on read-only system probes and workload analysis to match application requirements with available transport plugins. The process involves verifying system eligibility, analyzing communication profiles, and applying documented transport matrix rules to ensure compatibility and architectural fit. It avoids performance benchmarking or system mutation, focusing instead on static evidence to guide configuration.

What it does

  • Inspects target system hardware, drivers, and installed NVSHMEM transport plugins.
  • Analyzes communication profiles to determine workload-specific transport requirements.
  • Applies hard eligibility gates based on fabric, provider, and prerequisite availability.
  • Ranks eligible transport candidates using documented architectural fit rules.
  • Generates minimal environment variable exports for the recommended configuration.
  • Identifies missing prerequisites or unresolved system facts.

When to use it

  • When configuring NVSHMEM for a new cluster or hardware environment.
  • When optimizing transport settings for specific kernel communication patterns.
  • When troubleshooting compatibility issues between NVSHMEM and network fabrics.
  • When determining if a specific transport like GDAKI or IBRC is supported on a target node.

Advantages

  • Reduces configuration errors by enforcing hard eligibility gates.
  • Provides evidence-based recommendations without requiring runtime benchmarks.
  • Standardizes the selection process across different network fabrics and providers.
  • Minimizes manual effort by automating the collection of system transport facts.

Usage examples

“Inspect this target node and src/exchange.cu, then recommend a throughput-oriented transport for 256 PEs with 8 local PEs per node.”
The agent probes the system, analyzes the communication profile in the source file, and recommends a transport configuration based on the fabric and workload, providing the necessary environment exports.
“Recommend a compatibility-first transport for 32 PEs with 8 local PEs per node using the attached collector output.”
The agent evaluates the provided system facts against the transport matrix and outputs the most compatible transport configuration, noting any assumptions made during the process.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/nvidia/nvshmem-select-remote-transport/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip nvshmem-select-remote-transport.zip -d .agents/skills

Documentation by NVIDIA NVSHMEM Team

Select an NVSHMEM Remote Transport

Purpose

Recommend one NVSHMEM transport configuration from static evidence. Separate hard eligibility from expected kernel fit, distinguish documented facts from inference.

Focus on read-only system probes and source inspection. Do not run NVSHMEM applications, correctness tests, or performance benchmarks.

Prerequisites

  • Require an inventory of installed transport plugins before recommending a transport that must be available in the selected installation.

  • Record the installed NVSHMEM version when it is readily available, but do not require patch-level version verification for ordinary transport selection or stable settings such as NVSHMEM_REMOTE_TRANSPORT.

  • Require exact-version evidence only when the decision depends on a release gate, known issue, changed setting, or release-specific operation or memory-mode limitation.

  • Use the sibling $nvshmem-docs workflow, or its readable ../nvshmem-docs/SKILL.md, when the user requests current/exact official verification or an exact-version-sensitive decision cannot be resolved from the bundled matrix. Do not invoke it merely because the target patch differs from a source version reviewed by the matrix.

  • Require no API key, privileged command, network access for inspection, or benchmark execution.

Inputs

Core Recommendation Inputs
  • Installed transport-plugin inventory, or explicit user confirmation of the available transport.

  • Target fabric/provider: InfiniBand, RoCE, EFA, Slingshot/CXI, UCX-managed, or NVLink-only.

  • For kernel/workload analysis only, selected CUDA kernel/application source, or a profile covering:

    • host, on-stream, or device API use;

    • RMA, AMO, signaling, synchronization, or collective operations;

    • typical and range of message sizes;

    • issuing threads, warps, and CTAs;

    • peer fan-out and expected simultaneous message rate.

  • Job scale: total PEs and local PEs per node.

  • Intended outcome: general default, latency-sensitive, throughput-oriented, or compatibility-first.

Optional
  • Exact NVSHMEM patch version when the decision is not release-sensitive.

  • NVSHMEM_PREFIX, CMake cache, module/container details, launcher command, environment, and NVSHMEM configuration files.

  • GPU, NIC, driver, kernel, OFED/rdma-core, UCX, libfabric, GPUNetIO, or DOCA details not available through inspection.

  • GPU-to-NIC topology and local PE binding.

  • Host/device traffic mix, CPU availability, persistent-kernel behavior, batching opportunities, and completion frequency.

  • Required atomics, registered user buffers, VMM, DCI/DCT, multi-NIC, Spectrum-X, or custom-QP features.

  • Preferred or prohibited transports.

Do not re-ask facts the user already supplied. Prefer one best-evidence recommendation over a list of conditional branches. State material assumptions and unknowns, but withhold the selection configuration only when no candidate passes a hard gate or the setting itself cannot be resolved safely.

Instructions

1. Establish the Evidence Source

First establish whether the agent runs on the target system; ask unless the user already answered or supplied a complete target-system probe. Never infer this from the shell, scheduler, hostname, hardware, or repository.

If yes, inspect the complete bundled collector script before its first invocation in the current checkout. Run only that inspected file; if it is unavailable or incomplete, do not execute it. Then announce the read-only probe and invoke the collector without a prefix:

run_script("scripts/collect-transport-facts.sh")

If it resolves an NVSHMEM prefix, tell the user which installation will be analyzed. Otherwise ask for an absolute prefix and rerun:

run_script("scripts/collect-transport-facts.sh", "--prefix", "/opt/nvshmem")

Replace the example prefix with the resolved absolute prefix. Preserve partial output when it exits with status 2.

If the collector emits manual_follow_up_command entries, stop automatic probing and ask the user to run those commands manually in the target host or exact allocation/container used to launch NVSHMEM. Resume after the user returns their complete output. Do not repeat a command when equivalent successful output was already supplied.

If no, request complete output from bash scripts/collect-transport-facts.sh on the target, or its GPU/driver, NIC/fabric/provider, RDMA/provider-stack, and job-scale facts. Do not request an NVSHMEM prefix in this branch. Use installation evidence already supplied; otherwise eligibility remains conditional.

2. Choose the Analysis Scope

Ask one question with exactly two choices: kernel/workload analysis or system eligibility only. Skip this when already answered.

  • For kernel/workload analysis, inspect only the selected kernel, its reachable device call graph, and directly corresponding host/on-stream calls when source is supplied. Otherwise use the communication-profile fields in kernel-fit.md. Do not search for other kernels.

  • For system eligibility only, request no source/profile details. Select the compatibility-first default among candidates that pass the static system gates, emit its minimal selection configuration, and state that workload-specific performance was not assessed.

Treat assessment as read-only. Identify the job scale and optimization goal, and determine whether relevant communication can cross nodes; local P2P/NVLink traffic does not use the remote transport.

3. Classify the Communication

When kernel/workload analysis was selected, read kernel-fit.md and record:

  • API surface and exact operations;

  • remote versus local paths;

  • message-size distribution and whether operations are packed;

  • concurrent issuers, peers, and expected physical message rate;

  • ordering/completion frequency and QP pressure;

  • host/device mix, CPU availability, and persistent-kernel behavior;

  • scale-sensitive resource needs such as RC versus DCI/DCT.

Do not infer a high message rate merely from many logical elements. Account for application aggregation, one-thread issuance, warp coalescing, and batching.

4. Apply Hard Eligibility Gates

Read transport-matrix.md completely. Exclude a candidate when any required condition is disproven:

  • plugin unavailable in the selected NVSHMEM installation;

  • target release or required operation is known to be unsupported;

  • fabric/provider mismatch;

  • missing driver, peer-memory/DMA-BUF, GDRCopy, DevX, UCX, libfabric, GPUNetIO, or DOCA prerequisite;

  • incompatible memory mode, registered-buffer use, scale, or required feature.

Treat a missing fact as conditional only when it can invalidate the proposed configuration. Otherwise recommend the documented or compatibility-first default and list the missing fact under confidence and unknowns. Keep build support, runtime loadability, and hardware suitability separate.

For this skill, a loaded gdrdrv kernel module or visible /dev/gdrdrv device is sufficient positive evidence that the GDRCopy prerequisite is present. Do not require pkg-config, ldconfig, or a discovered libgdrapi path in addition, and do not treat missing userspace-library hints as evidence that GDRCopy is absent.

For IBGDA, evaluate both the GPU data path and a separate host remote transport. For GPUNetIO GDAKI, require gpunetio as the remote transport. Never enable IBGDA and GPUNetIO GDAKI together.

5. Rank Eligible Candidates

For system eligibility only, do not apply workload-fit rules. After hard eligibility, select a compatibility-first system default: IBRC for Mellanox InfiniBand or verified RoCE, native libfabric for EFA or Slingshot/CXI, a site-required UCX path, or none for a proven local-only deployment. Emit the selection block and do not claim it is the fastest. For kernel/workload analysis, apply these rules in order without assigning artificial scores:

  1. Mellanox/IB family gate: On Mellanox InfiniBand or verified RoCE, evaluate the native IB paths first. Use IBRC as the conservative baseline, then consider IBDevX, IBGDA, or GPUNetIO only when their prerequisites and workload fit justify them.

  2. Other native-fabric gate: Prefer libfabric with efa on EFA and cxi on Slingshot/CXI when no known release-specific operation or memory-mode limitation conflicts with the application.

  3. No remote network: Select none only when all relevant PEs communicate within a peer-reachable NVLink domain and no remote path is required.

  4. Fine-grained parallel device traffic: Favor an eligible GDAKI path when many GPU issuers submit small independent remote operations and a CPU proxy would serialize them.

  5. GDAKI choice:

    • Favor IBGDA when DCI/DCT connection scaling is required, GPUNetIO is absent, or the exact release has stronger required operation coverage.

    • Favor GPUNetIO GDAKI when its RC connection scale is acceptable and a unified GPUNetIO CPU/GPU path or verified DOCA feature is useful.

    • Do not treat GPUNetIO design goals as proof that it outperforms IBGDA for this workload.

  6. Proxy-friendly traffic: Favor a proxy path for host/on-stream-dominant work, packed larger transfers, low message concurrency, or latency-sensitive isolated operations.

  7. Mellanox proxy choice: Use IBRC as the conservative verbs default. Recommend IBDevX only when mlx5 DevX is available, its required operation coverage is sufficient, and a concrete requirement such as avoiding a GDRCopy-dependent path justifies it. Do not claim general IBDevX superiority.

  8. UCX choice: Favor UCX for a UCX-controlled deployment or a verified release-specific capability unavailable from the native alternatives. Preserve the bundled experimental/status caveats; consult exact documentation only when the selection depends on a release-specific detail.

If two candidates remain close, choose the compatibility-first option as the recommendation, report the other as runner-up, and state that static analysis cannot establish the performance winner.

Order the recommendation and candidate discussion by the target fabric. On Mellanox InfiniBand or verified RoCE, lead with IBRC, IBDevX, and IBGDA/GPUNetIO as applicable; do not lead with libfabric. On EFA or Slingshot/CXI, lead with the matching native libfabric provider.

6. Emit Minimal Selection Configuration

Emit only the variables required to select the resolved configuration:

ConfigurationMinimal exports
IBRCNVSHMEM_REMOTE_TRANSPORT=ibrc
IBDevXNVSHMEM_REMOTE_TRANSPORT=ibdevx
IBGDANVSHMEM_REMOTE_TRANSPORT=<resolved-host-transport> and NVSHMEM_IB_ENABLE_IBGDA=1
GPUNetIO CPUNVSHMEM_REMOTE_TRANSPORT=gpunetio and NVSHMEM_GPUNETIO_ENABLE_GDAKI=0
GPUNetIO GDAKINVSHMEM_REMOTE_TRANSPORT=gpunetio and NVSHMEM_GPUNETIO_ENABLE_GDAKI=1
UCXNVSHMEM_REMOTE_TRANSPORT=ucx
libfabricNVSHMEM_REMOTE_TRANSPORT=libfabric and `NVSHMEM_LIBFABRIC_PROVIDER=<cxi
No remoteNVSHMEM_REMOTE_TRANSPORT=none

Do not add HCA mapping, QP counts, batching, NIC handlers, memory-mode changes, or provider tuning to this block. Put mandatory compatibility preconditions outside the block and route mapping/tuning to the appropriate sibling skill.

Default to emitting the minimal selection block for the recommended best-evidence configuration. Withhold it only when no viable candidate passes the hard gates or a required value cannot be resolved, such as a missing plugin, fabric/provider mismatch, or mandatory incompatible memory mode. Do not withhold merely because the patch version, workload profile, optional capability, or performance winner is unknown.

7. Return the Recommendation

Use this exact section order:

Recommendation: <transport or combined host/GPU configuration; conditional if necessary>

Selection configuration
<minimal export block, or why it is withheld>

System eligibility evidence
<version, plugins, fabric/provider, driver/module/dependency evidence>

Kernel-fit evidence
<API surface, operation shape, sizes, concurrency, fan-out, completion, scale>

Runner-up
<candidate and the fact or tradeoff that kept it second>

Excluded candidates
<candidate: hard gate or unresolved prerequisite>

Confidence and unknowns
<high|medium|low; documented facts versus inference; missing evidence>

Static follow-up checks
<read-only checks or exact facts still needed; never benchmarks>

State the documentation version consulted when live verification was used. Describe performance as expected fit, not an assured result.

Routing

  • Route exact HCA selection and PE-to-NIC mapping to $nvshmem-configure-nic-pe-mapping when available.

  • Route missing packages, plugins, or builds to $nvshmem-install when available.

  • Route runtime initialization failures to $nvshmem-troubleshoot-and-report-bugs when available.

  • If a sibling skill is unavailable, provide the boundary and required next evidence without inventing its behavior.

Available Script

ScriptPurposeArguments
scripts/collect-transport-facts.shCollect read-only NVSHMEM, GPU, kernel-module, RDMA, and provider evidence from a target compute node.Optional --prefix PATH

Examples

  • Use $nvshmem-select-remote-transport. Inspect this target compute node and src/exchange.cu, then recommend a throughput-oriented transport for 256 PEs with 8 local PEs per node.

  • Use $nvshmem-select-remote-transport with the attached collector output and communication profile. Recommend a compatibility-first transport for 32 PEs with 8 local PEs per node, emit the minimal selection exports, and state any assumptions.

Guardrails

  • Do not run NVSHMEM binaries other than the read-only nvshmem-info -n query.

  • Do not launch distributed jobs, allocate nodes, benchmark transports, or mutate system/application state.

  • Do not recommend a plugin merely because its source exists; require evidence that the selected installation contains it.

  • Do not convert absent evidence into compatibility.

  • Do not claim that Ethernet link-layer evidence alone proves working RoCE.

  • Do not let kernel heuristics override an incompatible fabric/provider or missing prerequisite.

  • Do not emit both IBGDA and GPUNetIO GDAKI enables.

Troubleshooting

  • If the collector exits with status 2, preserve its output and resolve only the missing facts listed under diagnostics.

  • When nvidia-smi, ibstatus, ibv_devinfo, or rdma link fails or cannot see devices while static sysfs/module evidence suggests hardware exists, treat device access as unresolved rather than treating the hardware as absent. Ask the user to run the failed commands manually in the target host or exact launch environment; do not retry with privileges or infer eligibility from host-visible sysfs alone.

  • If a plugin is missing or fails to initialize, verify the selected prefix and dependencies, then route runtime failures to $nvshmem-troubleshoot-and-report-bugs.

  • If a specialized capability remains conditional, recommend the best supported fallback and emit its configuration. Ask for exact version, provider, or operation evidence only when it could change the setting or no fallback passes the hard gates.

Limitations

  • Static analysis estimates architectural fit; it does not validate runtime correctness, measure performance, or guarantee the fastest transport.

  • Some compatibility details are release-sensitive; verify the exact target release only when the recommendation depends on one of them.

  • The collector describes one node and one selected installation. It does not prove cluster-wide uniformity, working RoCE, or complete operation coverage.

  • Incomplete evidence lowers confidence and must be disclosed, but does not by itself prevent a best-evidence recommendation or minimal exports.

<!-- ci trigger -->

Files

scripts/collect-transport-facts.sh

#!/usr/bin/env bash
# Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# Collect read-only evidence used to select an NVSHMEM transport.
# Exit 0 means the core evidence categories were found; exit 2 means the
# output is still useful but one or more categories are incomplete.

set -u

usage() {
    printf '%s\n' \
        'Usage: collect-transport-facts.sh [--prefix PATH]' \
        '' \
        'Collect labeled, read-only NVSHMEM, GPU, RDMA, and provider facts.' \
        'Run this on the target compute node. No workload or benchmark is run.'
}

section() {
    printf '\n[%s]\n' "$1"
}

note_missing() {
    diagnostics+=("$1")
}

request_manual_follow_up() {
    manual_follow_ups+=("$1")
}

print_file() {
    local label=$1
    local path=$2
    if [[ -r "$path" ]]; then
        printf '%s: ' "$label"
        tr '\n' ' ' < "$path"
        printf '\n'
        return 0
    fi
    return 1
}

run_probe() {
    local label=$1
    shift
    printf '%s:\n' "$label"
    "$@" 2>&1
    local rc=$?
    printf '%s_exit_status: %d\n' "$label" "$rc"
    return "$rc"
}

prefix_arg=''
while (($#)); do
    case "$1" in
        --prefix)
            if (($# < 2)); then
                printf 'error: --prefix requires PATH\n' >&2
                usage >&2
                exit 64
            fi
            prefix_arg=$2
            shift 2
            ;;
        -h|--help)
            usage
            exit 0
            ;;
        *)
            printf 'error: unknown argument: %s\n' "$1" >&2
            usage >&2
            exit 64
            ;;
    esac
done

diagnostics=()
manual_follow_ups=()
version_ok=0
plugins_ok=0
gpu_ok=0
fabric_ok=0
verbs_ok=0
mlx5_rdma_visible=0

nvshmem_prefix=''
prefix_source='unresolved'
if [[ -n "$prefix_arg" ]]; then
    nvshmem_prefix=$prefix_arg
    prefix_source='--prefix'
elif [[ -n "${NVSHMEM_PREFIX:-}" ]]; then
    nvshmem_prefix=$NVSHMEM_PREFIX
    prefix_source='NVSHMEM_PREFIX'
elif command -v nvshmem-info >/dev/null 2>&1; then
    info_on_path=$(command -v nvshmem-info)
    nvshmem_prefix=$(dirname "$(dirname "$info_on_path")")
    prefix_source='nvshmem-info on PATH'
fi

section collector
if ! hostname_value=$(hostname 2>/dev/null); then
    hostname_value='unknown'
fi
if ! effective_user=$(id -un 2>/dev/null); then
    effective_user="uid:$(id -u 2>/dev/null || printf unknown)"
fi
printf 'schema: nvshmem-transport-facts-v1\n'
printf 'timestamp_utc: %s\n' "$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
printf 'hostname: %s\n' "$hostname_value"
printf 'effective_user: %s\n' "$effective_user"
printf 'prefix_source: %s\n' "$prefix_source"
if [[ -n "$nvshmem_prefix" ]]; then
    printf 'nvshmem_prefix: %s\n' "$nvshmem_prefix"
    if [[ ! -d "$nvshmem_prefix" ]]; then
        note_missing "resolved NVSHMEM prefix is not a readable directory: $nvshmem_prefix"
    fi
else
    printf 'nvshmem_prefix: unresolved\n'
    note_missing 'exact NVSHMEM installation prefix is unresolved'
fi

section nvshmem-version
info_bin=''
if [[ -n "$nvshmem_prefix" && -x "$nvshmem_prefix/bin/nvshmem-info" ]]; then
    info_bin="$nvshmem_prefix/bin/nvshmem-info"
elif command -v nvshmem-info >/dev/null 2>&1; then
    info_bin=$(command -v nvshmem-info)
fi

if [[ -n "$info_bin" ]]; then
    printf 'nvshmem_info: %s\n' "$info_bin"
    info_prefix_library_path=''
    if [[ -n "$nvshmem_prefix" ]]; then
        for libdir in "$nvshmem_prefix/lib" "$nvshmem_prefix/lib64"; do
            [[ -d "$libdir" ]] || continue
            if [[ -n "$info_prefix_library_path" ]]; then
                info_prefix_library_path+=":$libdir"
            else
                info_prefix_library_path=$libdir
            fi
        done
    fi

    if [[ -n "$info_prefix_library_path" ]]; then
        printf 'nvshmem_info_prefix_library_path: %s\n' "$info_prefix_library_path"
        info_ld_library_path=$info_prefix_library_path
        if [[ -n "${LD_LIBRARY_PATH:-}" ]]; then
            info_ld_library_path+=":$LD_LIBRARY_PATH"
        fi
        version_output=$(LC_ALL=C env LD_LIBRARY_PATH="$info_ld_library_path" "$info_bin" -n 2>&1)
    else
        version_output=$(LC_ALL=C "$info_bin" -n 2>&1)
    fi
    version_rc=$?
    printf '%s\n' "$version_output"
    printf 'nvshmem_info_exit_status: %d\n' "$version_rc"
    if ((version_rc == 0)) && grep -Eq '[0-9]+\.[0-9]+([.][0-9]+)?' <<< "$version_output"; then
        version_ok=1
    fi
else
    printf 'nvshmem_info: not found\n'
fi

if ((version_ok == 0)) && [[ -n "$nvshmem_prefix" ]]; then
    version_file="$nvshmem_prefix/version.txt"
    if [[ -r "$version_file" ]]; then
        version_file_evidence=$(grep -E '^NVSHMEM_(BASE|ARTIFACT|PACKAGE)_VERSION[[:space:]]*:=[[:space:]]*[0-9]+\.[0-9]+([.][0-9]+)?([^[:space:]]*)?[[:space:]]*$' "$version_file" 2>/dev/null || true)
        if [[ -n "$version_file_evidence" ]]; then
            printf 'version_file: %s\n%s\n' "$version_file" "$version_file_evidence"
            version_ok=1
        fi
    fi
fi

if ((version_ok == 0)) && [[ -n "$nvshmem_prefix" ]]; then
    version_header="$nvshmem_prefix/include/non_abi/nvshmem_version.h"
    if [[ -r "$version_header" ]]; then
        version_header_evidence=$(grep -E '^#[[:space:]]*define[[:space:]]+NVSHMEM_VENDOR_(BASE|ARTIFACT|PACKAGE)_VERSION_STRING[[:space:]]+"[0-9]+\.[0-9]+([.][0-9]+)?[^"]*"' "$version_header" 2>/dev/null || true)
        if [[ -n "$version_header_evidence" ]]; then
            printf 'header: %s\n%s\n' "$version_header" "$version_header_evidence"
            version_ok=1
        fi
    fi
fi

if ((version_ok == 0)) && [[ -n "$nvshmem_prefix" ]]; then
    for version_header in \
        "$nvshmem_prefix/include/non_abi/nvshmem_version.h" \
        "$nvshmem_prefix/include/device_host_transport/nvshmem_constants.h"; do
        if [[ -r "$version_header" ]]; then
            matches=$(grep -E '^#[[:space:]]*define[[:space:]]+NVSHMEM_VENDOR_((MAJOR|MINOR|PATCH)_VERSION[[:space:]]+[0-9]+|VERSION_STAGE(_NUMBER)?[[:space:]]+"[^"]*")([[:space:]]|$)' "$version_header" 2>/dev/null || true)
            if [[ -n "$matches" ]]; then
                printf 'header: %s\n%s\n' "$version_header" "$matches"
            fi
            if grep -Eq 'NVSHMEM_VENDOR_MAJOR_VERSION[[:space:]]+[0-9]+([[:space:]]|$)' <<< "$matches" &&
                grep -Eq 'NVSHMEM_VENDOR_MINOR_VERSION[[:space:]]+[0-9]+([[:space:]]|$)' <<< "$matches" &&
                grep -Eq 'NVSHMEM_VENDOR_PATCH_VERSION[[:space:]]+[0-9]+([[:space:]]|$)' <<< "$matches"; then
                version_ok=1
                break
            fi
        fi
    done
fi
if ((version_ok == 0)); then
    note_missing 'exact NVSHMEM version was not found'
fi

section nvshmem-plugins
plugin_count=0
plugin_file_count=0
declare -A plugin_transports_seen=()
if [[ -n "$nvshmem_prefix" && -d "$nvshmem_prefix" ]]; then
    shopt -s nullglob
    for libdir in "$nvshmem_prefix/lib" "$nvshmem_prefix/lib64"; do
        [[ -d "$libdir" ]] || continue
        printf 'searched_directory: %s\n' "$libdir"
        plugin_files=(
            "$libdir"/nvshmem_transport_*.so*
            "$libdir"/libnvshmem_transport_*.so*
        )
        for plugin in "${plugin_files[@]}"; do
            [[ -e "$plugin" || -L "$plugin" ]] || continue
            printf 'plugin: %s\n' "$plugin"
            ((plugin_file_count += 1))
            plugin_filename=${plugin##*/}
            plugin_transport=${plugin_filename#libnvshmem_transport_}
            plugin_transport=${plugin_transport#nvshmem_transport_}
            plugin_transport=${plugin_transport%%.so*}
            if [[ -n "$plugin_transport" ]]; then
                plugin_transports_seen["$plugin_transport"]=1
            fi
        done
    done
    shopt -u nullglob
    plugins_ok=1
    plugin_count=${#plugin_transports_seen[@]}
    if ((plugin_count)); then
        while IFS= read -r plugin_transport; do
            printf 'plugin_transport: %s\n' "$plugin_transport"
        done < <(printf '%s\n' "${!plugin_transports_seen[@]}" | LC_ALL=C sort)
    fi
    printf 'plugin_count_in_selected_prefix: %d\n' "$plugin_count"
    printf 'plugin_file_count_in_selected_prefix: %d\n' "$plugin_file_count"
else
    printf 'selected_prefix_inventory: unavailable\n'
    if command -v ldconfig >/dev/null 2>&1; then
        printf 'loader_cache_hints (not an exact-prefix inventory):\n'
        ldconfig -p 2>/dev/null | grep -E 'nvshmem.*transport|transport.*nvshmem' || printf 'none\n'
    fi
fi
if ((plugins_ok == 0)); then
    note_missing 'selected-prefix transport plugin inventory is unavailable'
elif ((plugin_count == 0)); then
    printf 'plugin_inventory_result: empty\n'
fi

section nvshmem-configuration
printf 'transport_related_environment:\n'
selection_environment=$(env | LC_ALL=C grep -E '^(NVSHMEM_(REMOTE_TRANSPORT|IB_ENABLE_IBGDA|GPUNETIO_ENABLE_GDAKI|LIBFABRIC_PROVIDER|BOOTSTRAP|SYMMETRIC_SIZE|DISABLE_CUDA_VMM|ENABLE_NIC_PE_MAPPING|HCA_LIST|HCA_PE_MAPPING)|UCX_TLS|FI_PROVIDER|FI_EFA_ENABLE_SHM_TRANSFER)=' | LC_ALL=C sort || true)
if [[ -n "$selection_environment" ]]; then
    printf '%s\n' "$selection_environment"
else
    printf 'none\n'
fi
for config_path in \
    "${NVSHMEM_CONFIG_FILE:-}" \
    "${nvshmem_prefix:+$nvshmem_prefix/etc/nvshmem.conf}"; do
    [[ -n "$config_path" ]] || continue
    if [[ -r "$config_path" ]]; then
        printf 'configuration_file: %s\n' "$config_path"
        grep -E '^[[:space:]]*(NVSHMEM_)?(REMOTE_TRANSPORT|IB_ENABLE_IBGDA|GPUNETIO_ENABLE_GDAKI|LIBFABRIC_PROVIDER|DISABLE_CUDA_VMM|HCA_LIST|HCA_PE_MAPPING)[[:space:]]*=' "$config_path" 2>/dev/null || printf 'no transport-selection entries\n'
    fi
done

section gpu
if command -v nvidia-smi >/dev/null 2>&1; then
    if run_probe gpu_inventory nvidia-smi --query-gpu=index,name,pci.bus_id,compute_cap,driver_version --format=csv,noheader; then
        gpu_ok=1
    fi
    run_probe gpu_topology nvidia-smi topo -m || true
    run_probe gpu_p2p_read nvidia-smi topo -p2p r || true
else
    printf 'nvidia_smi: not found\n'
    note_missing 'GPU and driver evidence is unavailable'
fi
if ((gpu_ok == 0)) && command -v nvidia-smi >/dev/null 2>&1; then
    note_missing 'nvidia-smi did not return a GPU inventory'
fi
if ((gpu_ok == 0)); then
    request_manual_follow_up 'nvidia-smi --query-gpu=index,name,pci.bus_id,compute_cap,driver_version --format=csv,noheader'
    request_manual_follow_up 'nvidia-smi topo -m'
fi

section kernel-driver
run_probe uname uname -a || true
print_file nvidia_driver_version /proc/driver/nvidia/version || printf 'nvidia_driver_version: unavailable\n'
if [[ -r /proc/driver/nvidia/params ]]; then
    printf 'PeerMappingOverride: '
    grep -E '^PeerMappingOverride:' /proc/driver/nvidia/params 2>/dev/null || printf 'not present\n'
else
    printf 'PeerMappingOverride: unavailable\n'
fi
for module in nvidia nvidia_peermem nv_peer_mem; do
    if [[ -d "/sys/module/$module" ]]; then
        printf 'module: %s loaded\n' "$module"
        print_file "${module}_version" "/sys/module/$module/version" || true
        print_file "${module}_initstate" "/sys/module/$module/initstate" || true
    else
        printf 'module: %s not_loaded\n' "$module"
    fi
done
if [[ -d /sys/module/dma_buf ]]; then
    printf 'dma_buf_kernel_module: present\n'
else
    printf 'dma_buf_kernel_module: not_visible\n'
fi
if [[ -d /sys/kernel/dmabuf ]]; then
    printf 'dma_buf_sysfs: present\n'
else
    printf 'dma_buf_sysfs: not_visible\n'
fi
kernel_release=$(uname -r 2>/dev/null || true)
for kernel_config in /proc/config.gz "/boot/config-$kernel_release"; do
    [[ -r "$kernel_config" ]] || continue
    printf 'dma_buf_kernel_config: %s\n' "$kernel_config"
    if [[ "$kernel_config" == *.gz ]] && command -v zgrep >/dev/null 2>&1; then
        zgrep -E '^CONFIG_(DMA_SHARED_BUFFER|DMABUF_MOVE_NOTIFY)=' "$kernel_config" 2>/dev/null || printf 'not reported\n'
    else
        grep -E '^CONFIG_(DMA_SHARED_BUFFER|DMABUF_MOVE_NOTIFY)=' "$kernel_config" 2>/dev/null || printf 'not reported\n'
    fi
done
printf 'dma_buf_note: kernel infrastructure alone does not prove a working GPU RDMA registration path\n'
if command -v modinfo >/dev/null 2>&1; then
    for module in nvidia_peermem nv_peer_mem; do
        printf '%s_modinfo:\n' "$module"
        modinfo -F version "$module" 2>&1 || true
    done
fi

section rdma-ports
shopt -s nullglob
ib_devices=(/sys/class/infiniband/*)
if ((${#ib_devices[@]})); then
    fabric_ok=1
    for ibdev_path in "${ib_devices[@]}"; do
        ibdev=${ibdev_path##*/}
        printf 'rdma_device: %s\n' "$ibdev"
        canonical_device=$(readlink -f "$ibdev_path/device" 2>/dev/null || true)
        [[ -n "$canonical_device" ]] && printf '  pci_device: %s\n' "${canonical_device##*/}"
        print_file '  vendor' "$ibdev_path/device/vendor" || true
        print_file '  device' "$ibdev_path/device/device" || true
        driver_link=$(readlink -f "$ibdev_path/device/driver" 2>/dev/null || true)
        if [[ -n "$driver_link" ]]; then
            driver_name=${driver_link##*/}
            printf '  driver: %s\n' "$driver_name"
            [[ "$driver_name" == mlx5_core ]] && mlx5_rdma_visible=1
        fi
        net_paths=("$ibdev_path"/device/net/*)
        for net_path in "${net_paths[@]}"; do
            [[ -e "$net_path" ]] && printf '  netdev: %s\n' "${net_path##*/}"
        done
        port_paths=("$ibdev_path"/ports/*)
        for port_path in "${port_paths[@]}"; do
            [[ -d "$port_path" ]] || continue
            port=${port_path##*/}
            printf '  port: %s\n' "$port"
            print_file '    state' "$port_path/state" || true
            print_file '    phys_state' "$port_path/phys_state" || true
            print_file '    link_layer' "$port_path/link_layer" || true
            print_file '    rate' "$port_path/rate" || true
        done
    done
else
    printf 'rdma_device: none visible in /sys/class/infiniband\n'
fi
shopt -u nullglob

section rdma-stack
if command -v ofed_info >/dev/null 2>&1; then
    run_probe ofed_version ofed_info -s || true
else
    printf 'ofed_info: not found\n'
fi
if command -v rdma >/dev/null 2>&1; then
    run_probe rdma_version rdma -V || true
    if ! run_probe rdma_links rdma link show; then
        request_manual_follow_up 'rdma link show'
    fi
else
    printf 'rdma: not found\n'
fi
if command -v ibv_devinfo >/dev/null 2>&1; then
    printf 'verbs_devices:\n'
    verbs_output=$(LC_ALL=C ibv_devinfo -l 2>&1)
    verbs_rc=$?
    printf '%s\n' "$verbs_output"
    printf 'verbs_devices_exit_status: %d\n' "$verbs_rc"
    if ((verbs_rc == 0)) && grep -Eq '^[[:space:]]*[1-9][0-9]* HCAs? found:' <<< "$verbs_output"; then
        verbs_ok=1
    fi
else
    printf 'ibv_devinfo: not found\n'
fi
if ((mlx5_rdma_visible && verbs_ok == 0)); then
    note_missing 'mlx5 RDMA hardware is visible in sysfs but no verbs HCA is accessible in this execution context'
    request_manual_follow_up 'ibstatus'
    request_manual_follow_up 'ibv_devinfo -l'
fi

section gdrcopy
gdrcopy_driver_evidence=0
if [[ -e /dev/gdrdrv ]]; then
    printf 'gdrcopy_device: /dev/gdrdrv present\n'
    gdrcopy_driver_evidence=1
else
    printf 'gdrcopy_device: /dev/gdrdrv not_visible\n'
fi
if [[ -d /sys/module/gdrdrv ]]; then
    printf 'gdrcopy_module: gdrdrv loaded\n'
    print_file gdrcopy_module_version /sys/module/gdrdrv/version || true
    print_file gdrcopy_module_initstate /sys/module/gdrdrv/initstate || true
    gdrcopy_driver_evidence=1
else
    printf 'gdrcopy_module: gdrdrv not_loaded\n'
fi

if ((gdrcopy_driver_evidence)); then
    printf 'gdrcopy_status: driver_present\n'
else
    printf 'gdrcopy_status: driver_not_detected\n'
fi
printf 'gdrcopy_note: userspace library hints are reported under provider-stacks; their absence does not disprove a custom installation\n'

section provider-stacks
if command -v ucx_info >/dev/null 2>&1; then
    run_probe ucx_version ucx_info -v || true
    printf 'ucx_transports:\n'
    LC_ALL=C ucx_info -d 2>&1 | LC_ALL=C grep -E '^#.*(Transport|Device):' || printf 'not reported\n'
else
    printf 'ucx_info: not found\n'
fi
if command -v fi_info >/dev/null 2>&1; then
    run_probe libfabric_version fi_info --version || true
    if run_probe libfabric_providers fi_info -l; then
        fabric_ok=1
    fi
else
    printf 'fi_info: not found\n'
fi
if command -v pkg-config >/dev/null 2>&1; then
    for package in libfabric ucx libmlx5 gdrapi gpunetio doca-gpunetio doca; do
        if pkg-config --exists "$package" 2>/dev/null; then
            printf 'pkg_config: %s %s\n' "$package" "$(pkg-config --modversion "$package" 2>/dev/null || printf unknown)"
        else
            printf 'pkg_config: %s not_found\n' "$package"
        fi
    done
else
    printf 'pkg-config: not found\n'
fi
if command -v ldconfig >/dev/null 2>&1; then
    printf 'provider_library_hints:\n'
    ldconfig -p 2>/dev/null | grep -E 'lib(ucp|ucs|uct|fabric|mlx5|efa|cxi|gdrapi|gpunetio|doca)' || printf 'none\n'
fi

section diagnostics
if ((fabric_ok == 0)); then
    note_missing 'neither an RDMA device nor a libfabric provider inventory was available'
fi
if ((${#diagnostics[@]})); then
    for diagnostic in "${diagnostics[@]}"; do
        printf 'partial: %s\n' "$diagnostic"
    done
else
    printf 'none\n'
fi
if ((${#manual_follow_ups[@]})); then
    printf 'manual_follow_up_context: run these commands manually in the target host or exact launch environment and return their complete output\n'
    for follow_up_command in "${manual_follow_ups[@]}"; do
        printf 'manual_follow_up_command: %s\n' "$follow_up_command"
    done
fi

if ((version_ok && plugins_ok && gpu_ok && fabric_ok)) &&
    ((${#diagnostics[@]} == 0 && ${#manual_follow_ups[@]} == 0)); then
    printf 'collector_status: complete\n'
    exit 0
fi

printf 'collector_status: partial\n'
exit 2

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an API key, Needs Node.js

Security

What our scanner noticed· Medium risk

  • Large base64-encoded blobs
  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
NVIDIA NVSHMEM Team
Publisher
NVIDIA (Official)
Source
NVIDIA/skills · skills/nvshmem-select-remote-transport · commit fce3cca
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE-APACHE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by NVIDIA NVSHMEM Team or NVIDIA.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download nvshmem-select-remote-transport.zip