Skip to content

Add AMD ROCm/HIP build support for nixlbench (follow-up to #1642) - #1647

Merged
brminich merged 3 commits into
ai-dynamo:mainfrom
andyluo7:nixlbench-rocm
Jun 5, 2026
Merged

brminich merged 3 commits into
ai-dynamo:mainfrom
andyluo7:nixlbench-rocm

Conversation

@andyluo7

@andyluo7 andyluo7 commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds AMD ROCm/HIP build support for nixlbench (the canonical NIXL benchmark tool), gated behind a default-off use_rocm=true Meson option. Stacks on top of #1642 (which provides the same option for the NIXL library proper).

When use_rocm=true, nixlbench builds against ROCm/HIP using the existing CUDA-shaped source code unchanged — translation happens transparently at preprocess time via header-only symbol aliases.

Approach: header-only symbol translation

benchmark/nixlbench/src/utils/utils.h adds an #ifdef __HIP_PLATFORM_AMD__ block that #defines every CUDA runtime + driver API symbol used by nixlbench to its HIP equivalent:

// Status types
#define cudaError_t                          hipError_t
#define cudaSuccess                          hipSuccess
#define CUresult                             hipError_t
#define CUDA_SUCCESS                         hipSuccess

// Runtime API
#define cudaMalloc                           hipMalloc
#define cudaMemcpy                           hipMemcpy
#define cudaSetDevice                        hipSetDevice
// ... etc

// Driver API: virtual memory
#define CUdeviceptr                          hipDeviceptr_t
#define CUmemAllocationProp                  hipMemAllocationProp
#define cuMemCreate                          hipMemCreate
#define cuMemMap                             hipMemMap
// ... etc

.cpp source files stay unchanged with cu*/cuda* names. utils.cpp and nixl_worker.cpp had direct #include <cuda.h> / #include <cuda_runtime.h> lines that bypassed utils.h's translations — those are removed; utils.h now provides the right header for both paths.

Two narrow code patches needed beyond pure aliasing:

  1. uintptr_t → void* cast at HIP virtual-memory call sites. CUDA's cuMemUnmap(CUdeviceptr=ulong, ...) accepts integer iov.addr implicitly; HIP's hipMemUnmap(void*, ...) rejects it. New NIXLB_DEV_PTR() macro (identity on CUDA, reinterpret_cast<void*> on HIP) wraps the call sites.
  2. [[nodiscard]] on hipDrvGetErrorString — original macro discards return; (void) cast added.

What's enabled / disabled on ROCm builds

Component ROCm path
UCX backend (NIXL library) ✅ via PR #1642
nixlbench binary ✅ via this PR
VRAM (GPU memory) transfers via UCX ✅ runtime-validated end-to-end
cuMem* virtual-memory allocator path (HAVE_CUDA_FABRIC) ⏭️ stays disabled — cpp.has_header_symbol('cuda.h', 'CU_MEM_HANDLE_TYPE_FABRIC') naturally fails on HIP, so the build falls through to the cudaMalloc/hipMalloc path
nvshmem worker ⏭️ unchanged (NVIDIA-only); future rocSHMEM work tracked separately

Runtime validation: nixlbench on AMD MI355X

Built and ran on AAC1 MI355X (gfx950, ROCm 7.2.0, container rocm/sgl-dev:v0.5.10.post1-rocm720-mi35x-20260503) with UCX 1.18.x --with-rocm. Two-process VRAM transfer via ASIO runtime, 50 iterations per block size:

Block Size (B)  Batch Size  B/W (GB/Sec)  Avg Lat (us)  Avg Tx (us)
4096            1           0.134640       30.4          14.1
8192            1           0.223101       36.7          11.5
16384           1           0.327987       50.0          10.0
65536           1           0.480172       136.5         11.5
1048576         1           0.621937       1686.0        4.0
16777216        1           0.637596       26313.2       0.0
67108864        1           0.637027       105347.0      0.0

Bandwidth saturates around 0.64 GB/s. This is not a peak-bandwidth number — UCX warned Driver ionic does not support the kernel ABI of 1 (supports 4 to 4) for the AAC1 RDMA HCAs, so UCX fell back to a non-RDMA transport. Same ionic driver issue we saw with the simpler vram_test in PR #1642's runtime evidence. The load-bearing claims here are correctness + scaling: payload transfers cleanly, latency scales linearly, two-process coordination works.

Stacks on PR #1642

This branch is built on top of #1642's commits (use_rocm option, hipcc toolchain, hw_info AMD detection, plugin disables). Both PRs need to be built with the same -Duse_rocm=true toolchain.

Once PR1 merges, this PR will be rebased onto main with no diff change.

Out of scope (intentional)

  • Multi-node UCX RDMA — needs RDMA fabric setup; not blocking for nixlbench correctness.
  • cuMem* virtual-memory path on HIP — would unlock the --enable_vmm mode. The cuMemCreate/cuMemAddressReserve/cuMemSetAccess block in nixl_worker.cpp:432-471 is gated on HAVE_CUDA_FABRIC which fails on HIP. If desired, follow-up could extend the translations + add CU_MEM_HANDLE_TYPE_FABRIC aliasing.
  • rocSHMEM worker — equivalent of the existing nvshmem worker but for ROCm. Separate plugin if NIXL maintainers want it.

Test plan

  • Build nixlbench on AAC1 MI355X with use_rocm=true (gfx950, ROCm 7.2.0, container)
  • Confirm HIP linkage: ldd build/nixlbench | grep amdhip64libamdhip64.so.7
  • Two-process VRAM transfer with --runtime_type ASIO, 50 iter, 4 KiB → 64 MiB block sweep — passes cleanly
  • Plugin loading: NIXL UCX + POSIX plugins picked up by nixlbench's NIXL_PLUGIN_DIR

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added ROCm/HIP accelerator support alongside CUDA for benchmark runs, including memory allocation, copy, and error reporting on ROCm devices.
  • Chores
    • Build/configuration now exposes an option to enable ROCm and will prefer ROCm linking when enabled; build flags and generated config reflect ROCm availability and warn if no accelerator is found.

@copy-pr-bot

copy-pr-bot Bot commented May 15, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

Copy link
Copy Markdown

👋 Hi andyluo7! Thank you for contributing to ai-dynamo/nixl.

Your PR reviewers will review your contribution then trigger the CI to test your changes.

🚀

@andyluo7

Copy link
Copy Markdown
Contributor Author

Cross-node RDMA bandwidth on AMD MI355X + AINIC

Following up on the build-only evidence in the PR description: I now have
end-to-end cross-node RDMA bandwidth working on AMD hardware with no Mellanox
involvement.

Setup

  • 2× AMD Instinct MI355X (gfx950) nodes on AAC1 (smci355-ccs-aus-g12-26g12-30)
  • AMD AINIC 400 Gb/s NDR ports (Pensando-derived ionic_0), RoCE v2
  • AMD libionic1 54.0-184 userspace + ionic-dkms 26.01.6.002 (the
    AMD-shipped Pensando stack, not stock Ubuntu rdma-core 39)
  • ROCm 7.2.2, UCX 1.18.1 with --with-rocm --with-verbs
  • NIXL with use_rocm=true (Add AMD ROCm/HIP build support for AMD Instinct GPUs (gfx942, gfx950) #1642) + nixlbench with use_rocm=true (this PR)

Bandwidth — cross-node, RC verbs over RoCE v2

Tool Block Bandwidth
ib_write_bw (raw rdma-core) 64 KB 327 Gb/s ← ground-truth
ucx_perftest -t tag_bw 4 MB 299 Gb/s (37.4 GB/s)
nixlbench UCX backend (DRAM) 16 MB 341 Gb/s = 42.6 GB/s

nixlbench exceeds ucx_perftest at 16 MB blocks because larger blocks
amortize per-transfer overhead better than perftest's default config. The
NIXL → UCX → AINIC path delivers 85% of NIC line rate (341/400 Gb/s) on
AMD hardware.

Critical config detail worth surfacing

The cross-node UCX wireup needs an AM-capable auxiliary transport.
UCX_TLS=rc_verbs,self alone fails with no auxiliary transport ... rc_verbs/ionic_0:1 - no connect to iface even though the RC iface is
created and QPs allocated successfully (visible in UCX_LOG_LEVEL=debug).
Adding tcp to UCX_TLS resolves it:

export UCX_TLS=rc_verbs,tcp,self
export UCX_NET_DEVICES=ionic_0:1,<mgmt-iface>
export UCX_IB_GID_INDEX=1   # RoCE v2 IPv4 (not default link-local v1)

Where earlier sessions hit walls

Earlier I'd reported failures on Tensorwave's amd-aim partition with
the same Pensando hardware. Root cause was purely that Tensorwave ships
the stock Ubuntu rdma-core 39.0 (libionic-rdmav34.so), which only
exposes UD QPs to userspace — no RC. AMD's own libionic1 54.0-184
exposes RC + CM properly, and the entire NIXL stack works end-to-end
with no source changes.

This dependency is purely environmental (driver stack on the deployment
node), not anything the PR can or should address.

VRAM caveat

VRAM→VRAM cross-node hit a UCX runtime memory-type detection issue
(VRAM memory is detected as host by UCX) despite UCX 1.18 being built
with --with-rocm and reporting rocm_copy/rocm_ipc transports plus
memory types: host (access,reg,cache), rocm (reg,cache) for rc_verbs.
This looks like UCX-rocm UCM hook configuration tuning — the same kind of
runtime config required on NVIDIA paths too, separate from the NIXL/nixlbench
PR scope. DRAM cross-node and intra-node VRAM (validated in earlier sessions)
already cover the code path; VRAM cross-node is a deployment/UCX-config item.

@andyluo7

Copy link
Copy Markdown
Contributor Author

Follow-up: VRAM cross-node bandwidth (root-caused + ceiling identified)

Closing the VRAM caveat from the previous comment. Quick differential
diagnosis revealed it was a UCX behavior gotcha, not a NIXL bug:

When UCX_TLS excludes rocm_copy / rocm_ipc, UCX closes the rocm
Memory Domain — but the rocm MD owns the hsa_amd_pointer_info query
path used to classify memory type. With it closed, ucp_mem_query returns
HOST for any address, including verified HIP device pointers (verified
in-process: HIP says hipMemoryTypeDevice, UCX says HOST on the same
address). Including rocm_copy,rocm_ipc in UCX_TLS keeps the MD alive
for detection.

Required env for AMD VRAM workloads:

export UCX_TLS=rc_verbs,tcp,self,rocm_copy,rocm_ipc

VRAM cross-node bandwidth (MI355X ↔ MI355X, AINIC, GPUDirect)

Block size nixlbench VRAM BW
1 MB 20.8 GB/s
4 MB 26.9 GB/s
16 MB 28.9 GB/s = 231 Gb/s

NIXL overhead vs raw UCX = ~0%

ucx_perftest -m rocm cross-node, 16 MB, same env, same NICs: 230 Gb/s.
Identical to nixlbench's 231 Gb/s — confirms NIXL adds no measurable
overhead on top of UCX for the VRAM data path.

Updated bandwidth table

Tool Memory BW % of 400 Gb/s line rate
ib_write_bw (raw RC) DRAM 327 Gb/s 82%
ucx_perftest DRAM 299 Gb/s 75%
nixlbench UCX backend DRAM 341 Gb/s 85%
ucx_perftest -m rocm VRAM (GPUDirect) 230 Gb/s 57%
nixlbench UCX backend VRAM (GPUDirect) 231 Gb/s 58%

The 231 Gb/s VRAM number reflects the actual GPUDirect ceiling of the
MI355X + AINIC + libionic 54 + UCX 1.18 stack today, not anything in
NIXL's path. Future improvements would come from UCX 1.19+ / AMD's
rocm/ucx 1.22 fork / libionic dmabuf-path tuning — all outside the
scope of these two PRs.

Comment thread benchmark/nixlbench/src/utils/utils.h Outdated
@andyluo7

Copy link
Copy Markdown
Contributor Author

@tvegas1 — yes, the gist's approach is what I'll adopt here. After we finalize the restructure on #1642 (dropping all ROCm-specific code from top-level nixl — discussion thread there), this PR will follow the gist exactly:

  • Add use_rocm + rocm_path options to nixlbench's meson_options.txt (not top-level)
  • Declare a separate rocm_dep (link -lamdhip64 -lhiprtc, include rocm/include), don't conflate with cuda_dep
  • Add -D__HIP_PLATFORM_AMD__ only as a nixlbench project arg
  • Conditionally pick cuda_dep OR rocm_dep per-target in utils/meson.build and worker/meson.build (your gist's exact pattern)
  • Source-side: #if HAVE_CUDA / HAVE_ROCM guards around cuda_runtime.h / hip_runtime.h, VRAM allocation path, VMM disablement on ROCm

The cross-node bandwidth numbers in my earlier comments (341 Gb/s DRAM, 231 Gb/s VRAM cross-node on MI355X + AINIC) were captured with the current branch, so I'll re-run after the restructure to confirm the gist-style refactor doesn't regress anything.

Will push the restructure on #1642 first, then rebase this PR on top and apply the gist pattern. Should I post the refactored diff here for review before pushing, or just push and let you review the new commit directly?

andyluo7 added a commit to andyluo7/nixl that referenced this pull request May 29, 2026
Per tvegas1's review on PR ai-dynamo#1642:

The PR's actual content (hwInfo sysfs PCI scan + UCX cleanup) needs no
ROCm-specific build args. NIXL builds vendor-neutrally; CPU-side
detection of AMD GPUs is via PCI vendor 0x1002 in hw_info.cpp,
independent of whether a ROCm toolchain is installed.

Removed:
- if use_rocm block in meson.build (hipcc lookup, -D__HIP_PLATFORM_AMD__,
  -lamdhip64/-lhiprtc link args, cuda_dep declare_dependency() shim,
  cuda_wheel_dir = nixl_rocm assignment)
- elif use_rocm doca_gpunetio_dep disabler in meson.build (the else
  branch already disables it; GPUNETIO is also gated at
  src/plugins/meson.build:122 via doca_gpunetio_dep.found())
- use_rocm option from meson_options.txt
- libfabric's use_rocm == '' guard (redundant; cuda_dep is naturally
  not-found on a ROCm-only host without CUDA installed)
- README "Building for AMD ROCm" section pointing to use_rocm

Added:
- wheel_variant Meson option in meson_options.txt
- wheel_variant override in meson.build cuda_wheel_dir logic
  (-Dwheel_variant=rocm -> nixl_rocm wheel name)
- README pointer to PR ai-dynamo#1647 for nixlbench HIP build support

Net: -64 +17 lines. HIP build args / rocm_dep belong in PR ai-dynamo#1647
(benchmark/nixlbench/), following the layout tvegas1 outlined in
his gist.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
@aranadive

Copy link
Copy Markdown
Contributor

@andyluo7 can you update the PR / resolve conflicts?

@andyluo7

andyluo7 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

@aranadive thanks for the ping. Heads up: the rebase is more than a textual conflict resolution — this PR's design is being changed per @tvegas1's review on the stacked PR #1642.

Where we are:

  1. Add AMD ROCm/HIP build support for AMD Instinct GPUs (gfx942, gfx950) #1642 (the base PR) is at green-light state after @tvegas1's review pushed us to drop the use_rocm Meson option from top-level nixl entirely. Latest commit on Add AMD ROCm/HIP build support for AMD Instinct GPUs (gfx942, gfx950) #1642 (f72aad2c) removes the HIP project args, drops the use_rocm option, and adds a generic wheel_variant override — net -47 lines. CI green. Waiting on tvegas1's final ack before he merges.

  2. Add AMD ROCm/HIP build support for nixlbench (follow-up to #1642) #1647 (this PR) was designed when ROCm support was expected to live partially in top-level nixl. With Add AMD ROCm/HIP build support for AMD Instinct GPUs (gfx942, gfx950) #1642's restructure, ALL HIP build support now needs to land here, but using @tvegas1's gist pattern, not the current header-only #define CUDA→HIP translation approach. The gist's pattern:

    • use_rocm / rocm_path options in benchmark/nixlbench/meson_options.txt (not top-level)
    • Separate rocm_dep (link -lamdhip64 -lhiprtc, include rocm/include), don't conflate with cuda_dep
    • -D__HIP_PLATFORM_AMD__ only as a nixlbench project arg
    • Conditional cuda_dep OR rocm_dep per-target in utils/meson.build and worker/meson.build
    • Source-side: #if HAVE_CUDA / HAVE_ROCM guards around cuda_runtime.h / hip_runtime.h, VRAM allocation, VMM disablement

A pure textual rebase here would actually be churn — the current commits all touch meson.build / meson_options.txt / utils.h in ways the gist redesign will undo.

Two options — happy with either, your call:

Option (a) is what tvegas1 implicitly asked for. Option (b) gets CI green faster but commits to throwaway intermediate state. Let me know which you prefer.

Cross-node bandwidth numbers I posted earlier (341 Gb/s DRAM, 231 Gb/s VRAM on MI355X + AINIC) were validated with the current branch's approach, so I'll re-run after the rewrite to confirm no regression.

Comment thread meson.build Outdated
Comment thread README.md
@andyluo7

andyluo7 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

@tvegas1 @edgargabriel @aranadive — thanks for the input. With #1642 now ✅ approved by @tvegas1 + @iyastreb, this PR's path forward is clear. Plan:

1. Full gist-style restructure (in progress)

Now that #1642 is locked in (drops use_rocm from top-level nixl), I'll rewrite this PR per @tvegas1's gist pattern:

  • Move use_rocm / rocm_path options into benchmark/nixlbench/meson_options.txt (not top-level)
  • Separate rocm_dep (link -lamdhip64 -lhiprtc, include rocm/include)
  • -D__HIP_PLATFORM_AMD__ only as a nixlbench project arg
  • Conditional cuda_dep OR rocm_dep per-target in utils/meson.build + worker/meson.build
  • Source-side: #if HAVE_CUDA / HAVE_ROCM guards around runtime headers, VRAM allocation, VMM disablement
  • Drops the current header-only #define CUDA→HIP translation approach

This is a force-push (single clean diff vs preserving the current commits). Will re-validate the cross-node bandwidth numbers (341 Gb/s DRAM / 231 Gb/s VRAM on MI355X + AINIC) after the rewrite.

2. ROCm Dockerfile (re: @tvegas1 on README.md:166)

Proposing to land it here in this PR (so the gist-style nixlbench build is reproducible end-to-end). Will use rocm/dev-ubuntu-24.04:7.1.1-complete as base, UCX 1.21.x with --with-rocm --with-verbs, and document the dmabuf workaround (-v /boot:/boot:ro + UCX_ROCM_{COPY,IPC}_DMABUF=yes + UCX_ROCM_IPC_MIN_ZCOPY=0) we found during the AINIC validation work.

3. nixl_rocm in release (re: @tvegas1) — agreed. #1642 already adds the wheel_variant Meson option; the release workflow can pass -Dwheel_variant=rocm to emit nixl_rocm wheels. I'll wire that into the release config either here or in a small follow-up — your call which.

4. ROCm CI (re: @edgargabriel) — your short-term compile-only proposal sounds great. Happy to:

  • Provide a compile recipe via the Dockerfile from (2) above for the runner to consume
  • Test the runner from my side once it lands (I have AAC1 MI355X + Hotaisle MI300X access for ad-hoc validation)
  • Coordinate with @kahalon on the medium-term private-runner plan when you're ready

@aranadive — to your earlier ping: the rebase-vs-redesign decision is settled (option a from my last reply). I'll push the restructure + Dockerfile in the next day or so once I've finished the gist-style rewrite locally. CI will be green on the new commit, no incremental textual rebase needed.

@andyluo7

andyluo7 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

Pushed fd9ffb8 — full gist-style rewrite + ROCm Dockerfile. Force-push; single commit; +263/-9 lines across 9 files.

 benchmark/nixlbench/contrib/Dockerfile.rocm        | 158 +++++++++++++++++++
 benchmark/nixlbench/meson.build                    |  43 ++++-
 benchmark/nixlbench/meson_options.txt              |   2 +
 benchmark/nixlbench/src/utils/meson.build          |   7 +-
 benchmark/nixlbench/src/utils/utils.cpp            |  14 +-
 benchmark/nixlbench/src/utils/utils.h              |  12 ++
 benchmark/nixlbench/src/worker/meson.build         |   7 +-
 benchmark/nixlbench/src/worker/nixl/meson.build    |   2 +
 benchmark/nixlbench/src/worker/nixl/nixl_worker.cpp|  27 ++-
 9 files changed, 263 insertions(+), 9 deletions(-)

Mapping to the gist (@tvegas1):

  • use_rocm + rocm_path options in benchmark/nixlbench/meson_options.txt (NOT top-level — Add AMD ROCm/HIP build support for AMD Instinct GPUs (gfx942, gfx950) #1642 already drops them from top-level nixl)
  • ✅ Separate rocm_dep declared with HIP link/include (not a cuda_dep shim)
  • -D__HIP_PLATFORM_AMD__ as a nixlbench-scoped project arg only
  • ✅ Conditional cuda_dep OR rocm_dep per target in utils/, worker/, worker/nixl/ meson.build files
  • ✅ Source-side #if HAVE_ROCM guards include hip/hip_runtime.h, map CHECK_CUDA_ERROR onto hipSuccess / hipGetErrorString, route VRAM hipMalloc/hipMemset/hipMemcpy/hipFree, and disable VMM on ROCm
  • ✅ The earlier header-only #define cuda→hip translation approach is gone

Dockerfile (@tvegas1's req from this PR + #1642):

  • Base: rocm/dev-ubuntu-24.04:7.1.1-complete per your sketch
  • UCX 1.21.x built from source with --with-rocm --with-verbs (Ubuntu's rdma-core UCX lacks ROCm support)
  • Documents the two-part dmabuf workaround we validated on AINIC: -v /boot:/boot:ro + UCX_ROCM_COPY_DMABUF=yes + UCX_ROCM_IPC_DMABUF=yes + UCX_ROCM_IPC_MIN_ZCOPY=0
  • Builds nixl with -Dwheel_variant=rocm (uses the option Add AMD ROCm/HIP build support for AMD Instinct GPUs (gfx942, gfx950) #1642 introduces) → nixl_rocm wheel naming
  • Builds nixlbench with -Duse_rocm=true

Outstanding:

  • @edgargabriel — Dockerfile is ready to consume for the compile-only CI you mentioned. Happy to coordinate.
  • @aranadive — to your conflict-resolution ping: this force-push subsumes the previous textual conflicts; CI will rebuild from a clean base on top of main.
  • I'll re-run the cross-node bandwidth validation (was 341/231 Gb/s DRAM/VRAM on MI355X+AINIC with the old approach) on this rewrite before declaring the PR ready for final review.

Depends on #1642 landing (the wheel_variant option). #1642 has both approvals — once it merges, this PR is structurally complete pending the BW re-validation.

@dpressle

dpressle commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

👀 Investigating Copyright Checks

@dpressle

dpressle commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

🤖 CI Triage AgentCopyright Checks · commit fd9ffb8b

I have everything needed for a complete diagnosis. Here is the full breakdown:


Summary: Copyright check fails because benchmark/nixlbench/meson_options.txt has a stale SPDX copyright year (2025) while the file was last modified in 2026.

Root cause: The copyright-check.sh script compares the year declared in the SPDX-FileCopyrightText header against the file's last-modified year. Line 1 of benchmark/nixlbench/meson_options.txt reads:

# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

This PR (nixlbench-rocm, commit fd9ffb8b) touched the file in 2026 without bumping the copyright year in the header, triggering the exact error:

❌ SPDX header check failed:
  - benchmark/nixlbench/meson_options.txt (copyright year 2025 < last modified 2026)

Implicated commit: [REDACTED:Hex High Entropy String] (author unknown from logs; most recent prior recorded commits are 2001a31d by ovidiusm and 6e06af14 by Subhadeep Bhattacharya)

File: benchmark/nixlbench/meson_options.txt:1

Suggested fix: Update the copyright year on line 1 of benchmark/nixlbench/meson_options.txt from 2025 to 2025-2026 (or just 2026):

-# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

Using the range form (2025-2026) is the conventional NVIDIA style and acknowledges both the original creation year and the current modification year.

Related: none

🛡️ This comment had 1 potential secret(s) redacted (Hex High Entropy String). See request_id 0e839a8f-9890-401e-9259-74d1dcd47537 in the triage console for the audit trail.

Comment thread benchmark/nixlbench/contrib/Dockerfile.rocm Outdated
@andyluo7

andyluo7 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

@tvegas1 great question on the Dockerfile. Quick analysis before I act:

Sharing with contrib/Dockerfile is impractical — the existing top-level Dockerfile is layered on nvcr.io/nvidia/cuda-dl-base:25.10-cuda13.0-devel-ubuntu24.04 with CUDA-specific install steps and conditional UCX stages keyed off the CUDA base. ROCm needs a different base (rocm/dev-ubuntu-24.04:7.1.1-complete), a different verbs stack (rdma-core + libibverbs from Ubuntu, not the cuda-dl-base's), and UCX configured --with-rocm instead of --with-cuda. Trying to fold them into one Dockerfile would require either a HW_VENDOR ARG with two giant conditional branches, or factoring shared steps into a base layer — both add reviewer cost without much code reuse.

Splitting into a separate PR is the right call — your option (b). Going to:

  1. Drop the Dockerfile from this PR in the next push, so Add AMD ROCm/HIP build support for nixlbench (follow-up to #1642) #1647 becomes pure source + meson changes (single small reviewable scope: ROCm build support for nixlbench).
  2. Open a follow-up PR (call it PR3) with the Dockerfile, ROCm CI build stub for @edgargabriel, and any contrib/*.sh modifications needed. That PR can iterate independently on the Docker base / UCX build matrix / dmabuf env-var documentation without re-blocking the actual code changes here.
  3. Wheel generation — the -Dwheel_variant=rocm option from Add AMD ROCm/HIP build support for AMD Instinct GPUs (gfx942, gfx950) #1642 already handles nixl_rocm naming. The release workflow plumbing (.github/workflows/ whatever-emits-wheels) likely belongs in PR3 as well so we keep the ROCm-packaging surface in one place.

Will push the Dockerfile drop shortly. CI (copyright-checks was failing on stale SPDX year in meson_options.txt) is fixed in 9330c15 — bumped to 2025-2026 per @dpressle's triage.

@andyluo7
andyluo7 force-pushed the nixlbench-rocm branch 2 times, most recently from 390662b to 608b1a2 Compare June 2, 2026 18:17
@andyluo7

andyluo7 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

Dockerfile dropped in 608b1a2 — PR is now source + meson only:

 benchmark/nixlbench/meson.build                    | 43 +++++-
 benchmark/nixlbench/meson_options.txt              |  4 +-
 benchmark/nixlbench/src/utils/meson.build          |  7 ++-
 benchmark/nixlbench/src/utils/utils.cpp            | 14 ++-
 benchmark/nixlbench/src/utils/utils.h              | 12 ++
 benchmark/nixlbench/src/worker/meson.build         |  7 ++-
 benchmark/nixlbench/src/worker/nixl/meson.build    |  2 +
 benchmark/nixlbench/src/worker/nixl/nixl_worker.cpp| 27 ++-
 8 files changed, 106 insertions(+), 10 deletions(-)

Will open PR3 with the Dockerfile + CI compile job + any contrib/*.sh modifications + wheel-generation workflow plumbing once #1642 and this PR land, so the ROCm-packaging surface stays in one place.

brminich pushed a commit that referenced this pull request Jun 4, 2026
…#1642)

* build(meson): add use_rocm and rocm_path options (no-op until plumbing lands)

Adds two new Meson options that are unused until the next commit wires
them up. NVIDIA build (default) is byte-identical.

- use_rocm (bool, default false): Opt in to building against ROCm/HIP
  instead of CUDA. Disables CUDA-only plugins.
- rocm_path (string, default /opt/rocm): ROCm install root.

Both options are read but not consumed yet — this commit is intentionally
no-op so reviewers can confirm option parsing in isolation before any
toolchain/plugin gating lands.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Signed-off-by: andyluo7 <andy.luo@amd.com>

* build(meson): wire ROCm/HIP toolchain when use_rocm=true

When use_rocm=true:
- Find hipcc at $rocm_path/bin/hipcc; friendly error if missing.
- Add -D__HIP_PLATFORM_AMD__ as global C++ project argument.
- Link -lamdhip64, -lhiprtc from $rocm_path/lib.
- Set cuda_dep = disabler() so all CUDA-conditional code (libfabric
  CUDA support, cuda_dep.found() guards across plugins,
  add_languages('CUDA'), etc.) cleanly skips itself.
- Set cuda_wheel_dir = 'nixl_rocm' (matches existing nixl_cu12/nixl_cu13
  pattern).

NVIDIA build path (default use_rocm=false) is byte-identical.

CUDA-only plugins (cuda_gds, gds_mt, gpunetio, libfabric) still need
their own subdir_done() guards at the top of each plugin's meson.build
because their headers include cuda.h unconditionally — that work lands
in the next commit.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Signed-off-by: andyluo7 <andy.luo@amd.com>

* src(utils): detect AMD GPUs (PCI vendor 0x1002) in hw_info

Extends the existing PCI scan in hwInfo to count AMD GPUs alongside the
existing NVIDIA / Mellanox / Amazon detection. Adds:
- kPciVendorAmd = 0x1002 constant
- numAmdGpus field on hwInfo
- AMD vendor branch in the GPU class check (PCI class 0x0300/0x0302)
- AMD count in the debug summary

NVIDIA detection is byte-identical (only the log message gained an
"NVIDIA" qualifier so the new "AMD GPU" log line reads consistently).

This fills a gap that RIXL did not close — RIXL's older snapshot
predated the upstream hw_info.cpp introduction.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Signed-off-by: andyluo7 <andy.luo@amd.com>

* build(plugins): disable CUDA-only plugins on ROCm builds

Adds an early subdir_done() to each NIXL plugin whose source includes
cuda.h or otherwise hard-depends on the NVIDIA SDK, so that
use_rocm=true builds don't trip on those headers.

- cuda_gds: GPUDirect Storage is NVIDIA-only.
- gds_mt: same; multi-threaded variant.
- gpunetio: DOCA GPUNetIO requires NVIDIA/Mellanox stack.
- libfabric: libfabric_backend.h has an unconditional <cuda.h> include.
  ROCm support is feasible (libfabric upstream has a ROCm provider) but
  requires refactoring the header to make CUDA optional. Tracked for a
  follow-up PR.

Each disable emits an explicit message() so the build log makes the
choice visible — no silent skip.

NVIDIA build path (use_rocm=false) is byte-identical: the new guards
live in the first lines of each meson.build and short-circuit only
when use_rocm is true.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Signed-off-by: andyluo7 <andy.luo@amd.com>

* docs(README): document AMD ROCm build support and plugin matrix

Adds a "Building for AMD ROCm" subsection to the existing build-options
documentation in README.md covering:

- Prerequisites: ROCm 7.x, hipcc, UCX 1.18+ with --with-rocm.
- Build invocation: meson setup -Duse_rocm=true.
- Plugin matrix: which plugins are enabled, which are auto-disabled
  (GDS/GDS_MT/GPUNETIO are NVIDIA-only; LIBFABRIC pending header
  refactor), and rationale for each disable.
- Verified hardware: Hotaisle MI300X (gfx942, ROCm 7.0.2) and AAC1
  MI355X (gfx950, ROCm 7.2.0).
- Known gaps: nixlbench HIP translation, libfabric refactor, no rocSHMEM
  backend yet — all flagged as candidates for follow-up PRs.

Also documents the two new Meson options (use_rocm, rocm_path) in the
Common build options bullet list.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Signed-off-by: andyluo7 <andy.luo@amd.com>

* build(plugins): bump SPDX copyright year to 2025-2026

Copyright Checks CI flagged stale 2025-only SPDX headers on the two
plugin meson.build files modified in this PR (cuda_gds, gds_mt). Bump
both to 2025-2026 to match the existing convention used elsewhere in
the tree (e.g. src/plugins/libfabric/meson.build, src/plugins/gpunetio/meson.build).

Diagnosed by NIXL CI triage agent on PR #1642.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Signed-off-by: andyluo7 <andy.luo@amd.com>

* build(meson): use empty cuda_dep instead of disabler() on ROCm

Tested locally on Hotaisle MI300X (ROCm 7.0.2): with cuda_dep = disabler()
the UCX plugin silently fails to build because UCX/meson.build lists
cuda_dep in its dependencies array even though UCX backend source uses
zero CUDA APIs. The disabler cascades through the dep list and nullifies
the shared_library() call, producing no .so file.

Switch to declare_dependency() (empty but .found() == true). The actual
disable of CUDA-only plugins (cuda_gds, gds_mt, gpunetio, libfabric)
is already handled by the explicit subdir_done() guards added at the
top of each of those plugin meson.build files in the previous commit.

After this fix, libplugin_UCX.so builds and links against ROCm-enabled
UCX (1.18.x with --with-rocm), enabling end-to-end AMD GPU transfers
through NIXL.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Signed-off-by: andyluo7 <andy.luo@amd.com>

* docs(hw_info): add docstrings to hwInfo fields + constructor

CodeRabbit's pre-merge Docstring Coverage check reported 66.67%
(threshold 80%). Adding doc comments to the four counter fields and
the private constructor brings hwInfo above the threshold while also
clarifying which PCI vendor/class each counter reflects.

No code changes; pure documentation.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Signed-off-by: andyluo7 <andy.luo@amd.com>

* fixup! Add AMD ROCm/HIP build support for AMD Instinct GPUs

Address reviewer feedback (iyastreb, tvegas1, edgargabriel):

- meson_options: merge use_rocm + rocm_path into a single string option;
  empty = CUDA build, non-empty = ROCm prefix (e.g. -Duse_rocm=/opt/rocm)
- meson.build: update ROCm detection to use_rocm string; remove stale
  subdir_done comment (those guards are gone); keep cuda_dep empty-dep
  explanation concise
- cuda_gds, gds_mt, libfabric meson.build: remove explicit use_rocm guards;
  these plugins already skip naturally (gds_path empty → subdir_done;
  libfabric cuda.h → link error on ROCm without real cuda_dep)
- ucx/meson.build: remove cuda_dep from ucx_backend_dependencies (false dep)
- ucx/ucx_utils.cpp: s/CUDA support/CUDA/ROCm support/ in warning string
- hw_info.h: strip per-field PCI vendor/ID comments; trim class docstring
- README.md: add gfx90a (MI250X) to supported arch list; update build
  invocation to reflect new single-option syntax

Signed-off-by: Andy Luo <andy.luo@amd.com>

* style: fix clang-format-19 violations in hw_info.h

Remove column-aligned spacing on member declarations and split
return-type-only lines for instance() and operator=() per
clang-format-19 style requirements.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>

* fix: address coderabbitai review comments on ROCm build options

- gpunetio/meson.build: use_rocm is now a string option; fix guard from
  boolean to != '' comparison
- libfabric/meson.build: skip cuda_dep and -DHAVE_CUDA on ROCm builds;
  cuda_dep is an empty declare_dependency() there and must not inject
  CUDA defines
- README.md: consolidate use_rocm + rocm_path into the single string
  option description, drop stale rocm_path entry

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>

* review: drop AMD copyright + revert no-op meson edits

- hw_info.{h,cpp}: remove AMD SPDX line (per iyastreb)
- src/plugins/cuda_gds/meson.build, src/plugins/gds_mt/meson.build:
  revert copyright year bump / stray blank line — files have no
  substantive ROCm changes (per tvegas1 "cleanup")
- src/plugins/gpunetio/meson.build: remove the use_rocm early-return
  guard. src/plugins/meson.build:122 already gates entry on
  doca_gpunetio_dep.found(), which is a disabler on ROCm builds, so
  the subdir is never recursed into. Removing the guard also
  preserves the proper "GPUNETIO requested but not available" error
  when -Dplugins=GPUNETIO is set explicitly on a ROCm build. (per
  tvegas1 "can we remove that check?")

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>

* docs(hw_info): add Doxygen comments to public hwInfo API

Per coderabbitai review on PR #1642: document the new public members
(numAmdGpus, numIbDevices, numEfaDevices) alongside the existing
numNvidiaGpus, and the instance() accessor. Comments describe the
sysfs-PCI-scan detection mechanism (vendor/class IDs) so callers
know no CUDA/ROCm/libibverbs runtime is required.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>

* style(hw_info): shorten field doc comments to fit 100-col limit

clang-format-19 reflowed the InfiniBand line in the previous commit
(>100 cols). Tighten all four field docs to the same compact form.
No semantic change.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>

* refactor(rocm): drop use_rocm Meson option; add wheel_variant override

Per tvegas1's review on PR #1642:

The PR's actual content (hwInfo sysfs PCI scan + UCX cleanup) needs no
ROCm-specific build args. NIXL builds vendor-neutrally; CPU-side
detection of AMD GPUs is via PCI vendor 0x1002 in hw_info.cpp,
independent of whether a ROCm toolchain is installed.

Removed:
- if use_rocm block in meson.build (hipcc lookup, -D__HIP_PLATFORM_AMD__,
  -lamdhip64/-lhiprtc link args, cuda_dep declare_dependency() shim,
  cuda_wheel_dir = nixl_rocm assignment)
- elif use_rocm doca_gpunetio_dep disabler in meson.build (the else
  branch already disables it; GPUNETIO is also gated at
  src/plugins/meson.build:122 via doca_gpunetio_dep.found())
- use_rocm option from meson_options.txt
- libfabric's use_rocm == '' guard (redundant; cuda_dep is naturally
  not-found on a ROCm-only host without CUDA installed)
- README "Building for AMD ROCm" section pointing to use_rocm

Added:
- wheel_variant Meson option in meson_options.txt
- wheel_variant override in meson.build cuda_wheel_dir logic
  (-Dwheel_variant=rocm -> nixl_rocm wheel name)
- README pointer to PR #1647 for nixlbench HIP build support

Net: -64 +17 lines. HIP build args / rocm_dep belong in PR #1647
(benchmark/nixlbench/), following the layout tvegas1 outlined in
his gist.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>

* revert(libfabric): restore meson.build to upstream main per @aranadive

Per @aranadive's review on #1642, the earlier `# Add CUDA support if
available` comment removal in src/plugins/libfabric/meson.build is not
load-bearing and drops a CODEOWNERS approver from the required set.

Restores the file to match origin/main exactly. The libfabric plugin
behavior is unchanged — `cuda_dep.found()` returns false on ROCm-only
hosts (no CUDA toolchain present), so the plugin naturally skips the
CUDA path without an explicit guard.

Signed-off-by: Andy Luo <anluo@amd.com>
Signed-off-by: andyluo7 <andy.luo@amd.com>

---------

Signed-off-by: andyluo7 <andy.luo@amd.com>
Signed-off-by: Andy Luo <andy.luo@amd.com>
Signed-off-by: Andy Luo <anluo@amd.com>
@andyluo7

andyluo7 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

🎉 #1642 just merged (313121be on main) — this PR is now rebased on top in 241c6e4. Force-pushed; single commit; zero conflicts.

Diff against main is unchanged in shape (8 files / +106 -10):

 benchmark/nixlbench/meson.build                    | 43 ++++++++++++++++++--
 benchmark/nixlbench/meson_options.txt              |  4 +-
 benchmark/nixlbench/src/utils/meson.build          |  7 ++-
 benchmark/nixlbench/src/utils/utils.cpp            | 14 +++++--
 benchmark/nixlbench/src/utils/utils.h              | 12 ++++++
 benchmark/nixlbench/src/worker/meson.build         |  7 ++-
 benchmark/nixlbench/src/worker/nixl/meson.build    |  2 +
 benchmark/nixlbench/src/worker/nixl/nixl_worker.cpp| 27 +++++++++++-

CI should re-run on the rebased HEAD shortly.


Review-ask resolution table

Asker Comment Plan Status
@tvegas1 check the gist, see if the approach works (utils.h) Adopted exactly: separate rocm_dep, per-target conditional, source-side HAVE_ROCM guards ✅ done
@tvegas1 "We would need to add the ROCm build to CI somehow" (meson.build) @edgargabriel volunteered compile-only CI mirroring UCC/UCX, short-term 🟡 owned by @edgargabriel
@tvegas1 "Dockerfile with ROCm libraries + nixl_rocm to release" (README.md) Deferred to follow-up PR3 — keeps ROCm-packaging surface (Dockerfile + CI compile job + nixl_rocm release wheel workflow) in one place 🟡 planned for PR3
@edgargabriel "can you ping me separately... compile-only CI first, private runner medium-term" Will coordinate with you; AAC1 MI355X + Hotaisle MI300X available for validation runs 🟡 active

Pending on my side

  • BW re-validation on this rewrite — previously measured 341 Gb/s DRAM / 231 Gb/s VRAM cross-node on MI355X+AINIC with the old header-only #define approach. Will re-run against the gist-style code path as soon as MI355X access frees up and post results here as evidence of no regression.

Ready for a fresh look from any of @tvegas1 @aranadive @iyastreb @brminich @edgargabriel — your approvals on #1642 carried this through, would love a re-review on this slimmer follow-up.

Comment thread benchmark/nixlbench/meson.build Outdated
Comment thread meson.build Outdated
Comment thread benchmark/nixlbench/src/utils/utils.h
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 12, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 12, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 13, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 13, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 14, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 14, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 14, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 14, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 14, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 14, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 15, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 17, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 17, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 17, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 18, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 23, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 24, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 24, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 24, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - getMrAttrIface(): returns FI_HMEM_ROCR for AMD devices.
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 24, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 24, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jun 27, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
ryanhankins added a commit to ryanhankins/nixl that referenced this pull request Jul 10, 2026
Make the libfabric plugin usable for VRAM transfers on AMD GPU systems
connected via Slingshot.

Build system
  - meson_options.txt: add use_rocm (bool, default false) and rocm_path
    at top level, matching the pattern from ai-dynamo#1647.
  - meson.build: when use_rocm=true, locate libamdhip64 under rocm_path
    and alias cuda_dep=rocm_dep; CUDA-only plugins (GDS, GDS_MT, GPUNETIO)
    self-disable because their additional CUDA-only deps are absent.
  - src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build:
    emit -DHAVE_ROCM / -D__HIP_PLATFORM_AMD__ in place of -DHAVE_CUDA
    when use_rocm=true.

libfabric backend (libfabric_backend.h / .cpp)
  - nixlLibfabricRocmCtx: analogous to the existing CudaCtx guard,
    initialises a HIP context and drives per-device current-context
    management.  Added under #ifdef HAVE_ROCM.
  - rocmQueryAddr(): uses hipPointerGetAttributes + hipDeviceGetPCIBusId
    to classify a pointer as VRAM and return its GPU PCI bus-id string,
    mirroring cudaQueryAddr().
  - getSupportedMems(): advertises VRAM_SEG when HAVE_ROCM is defined.
  - registerMem(): calls rocmQueryAddr() for VRAM_SEG segments, passes
    FI_HMEM_ROCR to the rail-manager registration path.

AMD GPU topology (libfabric_topology.h / .cpp)
  - num_amd_accel counter; isAmdAccel() matches AMD vendor 0x1002 with
    PCI class 0x03xx (display/3D — discrete GPUs) or 0x12xx (Processing
    Accelerators — MI300A APU, which carries no display class).
  - discoverAccelWithHwloc(): detects AMD accelerators alongside NVIDIA/
    Neuron and increments num_amd_accel.
  - buildTopologyAwareGrouping(): includes AMD accelerators in the
    PCIe-topology grouping algorithm so each GPU is paired with its
    nearest CXI NIC(s).
  - printTopologyInfo(): reports AMD GPU count.

Rail manager (libfabric_rail_manager.cpp)
  - registerMemory(): adds FI_HMEM_ROCR branch after the existing CUDA
    branch so VRAM buffers are registered with the correct HMEM iface.

Signed-off-by: Ryan Hankins <ryan.hankins@hpe.com>
riley-dixon added a commit to riley-dixon/nixl that referenced this pull request Sep 15, 2026
Mirrors the root project's rocm_path change: a ROCm build is triggered when
rocm_path is set to where ROCm is installed. An empty rocm_path means ROCm
support will not be added.

nixlbench also had two controls for one decision: -Duse_rocm from ai-dynamo#1647 and the
-Dnixlbench_gpu added here. They were not equivalent -- use_rocm only asserted
that ROCm must be present, it never selected it, so -Duse_rocm=true on a host
with both SDKs configured a CUDA binary while claiming to require ROCm. Keep
nixlbench_gpu as the single selector and make use_rocm a compatibility alias
that forces the rocm flavor; combining it with -Dnixlbench_gpu=cuda is now an
error rather than a silent CUDA build.

Signed-off-by: Riley Dixon <riley.dixon@amd.com>
riley-dixon added a commit to riley-dixon/nixl that referenced this pull request Sep 15, 2026
Mirrors the root project's rocm_path change: a ROCm build is triggered when
rocm_path is set to where ROCm is installed. An empty rocm_path means ROCm
support will not be added.

nixlbench also had two controls for one decision: -Duse_rocm from ai-dynamo#1647 and the
-Dnixlbench_gpu added here. They were not equivalent -- use_rocm only asserted
that ROCm must be present, it never selected it, so -Duse_rocm=true on a host
with both SDKs configured a CUDA binary while claiming to require ROCm. Keep
nixlbench_gpu as the single selector and make use_rocm a compatibility alias
that forces the rocm flavor; combining it with -Dnixlbench_gpu=cuda is now an
error rather than a silent CUDA build.

Signed-off-by: Riley Dixon <riley.dixon@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants