Skip to content

CollectiveX: keep PCI discovery in the bundled hwloc for aws-ofi-nccl / CollectiveX:在 aws-ofi-nccl 自带的 hwloc 中保留 PCI 发现 - #4612

Merged
Oseltamivir merged 2 commits into
mainfrom
cx-ofi-hwloc-io
Oct 28, 2026
Merged

Oseltamivir merged 2 commits into
mainfrom
cx-ofi-hwloc-io

Conversation

@Oseltamivir

Copy link
Copy Markdown
Collaborator

Summary

nccl-ep EP16 on h100-dgxc failed with "NCCL EP requires NCCL Device API support". The bundled aws-ofi-nccl plugin logged "Unexpected topo group size of 0": its static hwloc was configured with --disable-io, so hwloc saw no PCI devices, the plugin could not group NICs with GPUs, and NCCL GIN got no RDMA protocol.

  • Build a static libpciaccess 0.16 (pinned by sha256) and configure hwloc against it, so PCI discovery works.
  • Merge the libpciaccess objects into libhwloc.a and drop hwloc's .la. libtool otherwise packed libpciaccess.a into the plugin's convenience archive as an unreadable member and the link failed.
  • The backend cache key gains the libpciaccess version so stale plugin builds are rebuilt.

Validated on h100-dgxc: h100-dgxc-nccl-ep-ll-bf16-n2 now succeeds, with the oracle green on every rung.

中文

h100-dgxc 上的 nccl-ep EP16 报错 "NCCL EP requires NCCL Device API support"。自带的 aws-ofi-nccl 插件提示 "Unexpected topo group size of 0":其静态 hwloc 使用了 --disable-io,看不到任何 PCI 设备,插件无法将网卡与 GPU 分组,NCCL GIN 因此没有 RDMA 协议。

  • 构建静态 libpciaccess 0.16(按 sha256 固定)并让 hwloc 依赖它,恢复 PCI 发现。
  • 将 libpciaccess 的目标文件并入 libhwloc.a 并删除 hwloc 的 .la,否则 libtool 会把 libpciaccess.a 作为无法读取的成员打包进插件便利库,导致链接失败。
  • 后端缓存键加入 libpciaccess 版本,旧的插件构建会被重新构建。

已在 h100-dgxc 上验证:h100-dgxc-nccl-ep-ll-bf16-n2 成功,每一档 oracle 均通过。

AI disclosure

Drafted and tested with an AI coding assistant; reviewed by the author.

…uild

The bundled hwloc was configured without I/O discovery, so aws-ofi-nccl found no NIC beside any
GPU, its RDMA protocol failed to start (topo group size 0), and GIN, which runs only on that
protocol, was unavailable: every nccl-ep EP16 case on H100 failed. hwloc now reads the PCI tree
through a static libpciaccess (0.16, hash-pinned) linked into the plugin, and a plugin built on
the bundled hwloc keys its own cache so the broken build is replaced.

内置 hwloc 曾在关闭 I/O 发现的情况下配置,导致 aws-ofi-nccl 找不到任何 GPU 旁的网卡,其 RDMA 协议无法启动
(拓扑组大小为 0),而 GIN 只能运行在该协议上,因此不可用:H100 上所有 nccl-ep EP16 用例均失败。现在 hwloc
通过静态链接进插件的 libpciaccess(0.16,固定哈希)读取 PCI 树;基于内置 hwloc 构建的插件使用独立缓存键,
以替换此前损坏的构建。
libtool packed libpciaccess.a into the plugin's convenience archive as an unreadable member, so
the aws-ofi-nccl link failed. Its objects now join libhwloc.a, and hwloc's .la is dropped so
libtool links the archive as is.

libtool 曾把 libpciaccess.a 作为无法读取的成员打包进插件的便利库,导致 aws-ofi-nccl 链接失败。现在其目标文件
并入 libhwloc.a,并删除 hwloc 的 .la,使 libtool 直接链接该静态库。
@Oseltamivir
Oseltamivir requested a review from a team October 28, 2026 12:24
@Oseltamivir
Oseltamivir merged commit 67d3c39 into main Oct 28, 2026
4 checks passed
@Oseltamivir
Oseltamivir deleted the cx-ofi-hwloc-io branch October 28, 2026 12:27

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I reviewed this PR and found no bugs. It changes how the aws-ofi-nccl plugin's static hwloc is built, adds a new third-party source download, and touches the CODEOWNER-covered collectivex/ path, so a human look would still be worthwhile.

What was reviewed:

  • The libpciaccess fetch is pinned by sha256 the same way as the hwloc and aws-ofi-nccl tarballs, and a failure in any step returns 1 before the cache is marked ready.
  • The ar x / ar rs merge: libpciaccess's object names (common_*.o, linux_*.o) don't collide with hwloc's (topology*.o, pci-common.o, ...), so ar rs adds them rather than replacing hwloc members.
  • The cache key: the new variant applies only when /usr/include/hwloc.h is missing, and the /tmp fallback path uses the same key, so stale plugins built with --disable-io get rebuilt.
Extended reasoning...

The change is about 40 lines across two CollectiveX shell scripts. It adds a sha256-pinned libpciaccess 0.16 build, turns hwloc I/O discovery back on, merges libpciaccess's objects into libhwloc.a and drops libhwloc.la, and adds the bundled-build variant to the aws-ofi-nccl cache key. It has no auth or data-exposure surface. It does add a new external source download, which is checksum-verified. I deferred rather than approved because collectivex/ is covered by a CODEOWNERS entry and because the libtool archive-merge workaround is a build-chain design choice that the code owners should confirm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant