fix(perf): reinstate aws-ofi-nccl EFA plugin for EKS - #5033
Conversation
The NVIDIA PyTorch >= 26.06 base image dropped aws-ofi-nccl and defaults NCCL_NET_PLUGIN=spcx (HPCX Spectrum-X), so NCCL cannot use EFA on EKS. Rebuild the plugin from source into /opt/amazon/ofi-nccl against the reinstalled NCCL and the image's libfabric, and pin it in EKSEnvPlugin for AWS jobs (overriding the spcx default). GCP is untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: oliver könig <okoenig@nvidia.com>
|
Light review — looks solid. The change is well-scoped and clearly documented: rebuild A few points to verify: 1. (Question) Installed library filename. 2. (Minor) Shebang placement. Suggested test cases:
No perf/recipe configs under |
Moving the plugin build below the vLLM install keeps the CUDA-toolkit and vLLM layers cache-valid (the step only appends a new final layer). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: oliver könig <okoenig@nvidia.com>
Background
The NVIDIA PyTorch base image no longer ships the aws-ofi-nccl plugin (the
NCCL ⇆ libfabric bridge for AWS EFA) and now defaults
NCCL_NET_PLUGIN=spcx(HPCX Spectrum-X). The EFA/libfabric userspace is still present in the image
(
/opt/amazon/efa), but without theaws-ofi-nccllibnccl-net.so, NCCL cannotrun over EFA on EKS. The base even leaves a dangling
/etc/ld.so.conf.d/aws-ofi-nccl.conf → /opt/amazon/ofi-nccl/lib.This restores the plugin and selects it for AWS jobs.
What changed
aws-ofi-ncclfrom source (publicgithub.qkg1.top/aws/aws-ofi-nccl, pinnedv1.17.3) against the reinstalled NCCL andthe image's libfabric, installing it into
/opt/amazon/ofi-nccl— the prefix theleftover
aws-ofi-nccl.confalready registers.NCCL_NET_PLUGINto that plugin for AWS jobs, overriding thebase image's
spcxdefault. GCP is untouched (still selects gIB).Details
docker/common/install_aws_ofi_nccl.sh— clones + builds the plugin(
--with-libfabric=/opt/amazon/efa --with-cuda=/usr/local/cuda --with-nccl=/usr --enable-platform-aws), installs to/opt/amazon/ofi-nccl, refreshes theldconfig entry,
ldconfig. Version pinned via--AWS_OFI_NCCL_VER.docker/Dockerfile.fw_base— newARG AWS_OFI_NCCL_VERSION=v1.17.3; runs thescript in
fw_toolkit_builderright afterinstall_nccl.sh, so the plugin linksagainst the reinstalled NCCL.
scripts/performance/utils/csp_plugins.py—EKSEnvPluginnowsetdefaultsNCCL_NET_PLUGIN=/opt/amazon/ofi-nccl/lib/libnccl-net.so(absolutepath — the image also ships an HPCX
libnccl-net.so, so a bare soname isambiguous). A recipe/user override still wins.
GKEEnvPluginunchanged.tests/unit_tests/scripts/performance/test_csp_plugins.py— new coverage forboth CSP plugins (previously untested).
Tested
pytest tests/unit_tests/scripts/performance/test_csp_plugins.py— asserts theEKS plugin pins aws-ofi + EFA, respects a pre-set override, and no-ops off
Kubeflow; the GKE plugin never sets
NCCL_NET_PLUGIN.