Add AMD ROCm/HIP build support for nixlbench (follow-up to #1642) - #1647
Conversation
|
👋 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. 🚀 |
Cross-node RDMA bandwidth on AMD MI355X + AINICFollowing up on the build-only evidence in the PR description: I now have Setup
Bandwidth — cross-node, RC verbs over RoCE v2
Critical config detail worth surfacingThe cross-node UCX wireup needs an AM-capable auxiliary transport. 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 wallsEarlier I'd reported failures on Tensorwave's This dependency is purely environmental (driver stack on the deployment VRAM caveatVRAM→VRAM cross-node hit a UCX runtime memory-type detection issue |
Follow-up: VRAM cross-node bandwidth (root-caused + ceiling identified)Closing the VRAM caveat from the previous comment. Quick differential When Required env for AMD VRAM workloads: export UCX_TLS=rc_verbs,tcp,self,rocm_copy,rocm_ipcVRAM cross-node bandwidth (MI355X ↔ MI355X, AINIC, GPUDirect)
NIXL overhead vs raw UCX = ~0%
Updated bandwidth table
The 231 Gb/s VRAM number reflects the actual GPUDirect ceiling of the |
|
@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:
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? |
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>
|
@andyluo7 can you update the PR / resolve conflicts? |
|
@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:
A pure textual rebase here would actually be churn — the current commits all touch 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. |
|
@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
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 3. nixl_rocm in release (re: @tvegas1) — agreed. #1642 already adds the 4. ROCm CI (re: @edgargabriel) — your short-term compile-only proposal sounds great. Happy to:
@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. |
|
Pushed Mapping to the gist (@tvegas1):
Dockerfile (@tvegas1's req from this PR + #1642):
Outstanding:
Depends on #1642 landing (the |
|
👀 Investigating |
|
🤖 CI Triage Agent — I have everything needed for a complete diagnosis. Here is the full breakdown: Summary: Copyright check fails because Root cause: The This PR ( Implicated commit: File: Suggested fix: Update the copyright year on line 1 of -# 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 ( Related: none
|
|
@tvegas1 great question on the Dockerfile. Quick analysis before I act: Sharing with Splitting into a separate PR is the right call — your option (b). Going to:
Will push the Dockerfile drop shortly. CI ( |
390662b to
608b1a2
Compare
|
Dockerfile dropped in Will open PR3 with the Dockerfile + CI compile job + any |
…#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>
|
🎉 #1642 just merged ( Diff against main is unchanged in shape (8 files / +106 -10): CI should re-run on the rebased HEAD shortly. Review-ask resolution table
Pending on my side
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. |
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Summary
Adds AMD ROCm/HIP build support for nixlbench (the canonical NIXL benchmark tool), gated behind a default-off
use_rocm=trueMeson 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.hadds an#ifdef __HIP_PLATFORM_AMD__block that#defines every CUDA runtime + driver API symbol used by nixlbench to its HIP equivalent:.cppsource files stay unchanged withcu*/cuda*names.utils.cppandnixl_worker.cpphad direct#include <cuda.h>/#include <cuda_runtime.h>lines that bypassedutils.h's translations — those are removed;utils.hnow provides the right header for both paths.Two narrow code patches needed beyond pure aliasing:
uintptr_t → void*cast at HIP virtual-memory call sites. CUDA'scuMemUnmap(CUdeviceptr=ulong, ...)accepts integeriov.addrimplicitly; HIP'shipMemUnmap(void*, ...)rejects it. NewNIXLB_DEV_PTR()macro (identity on CUDA,reinterpret_cast<void*>on HIP) wraps the call sites.[[nodiscard]]onhipDrvGetErrorString— original macro discards return;(void)cast added.What's enabled / disabled on ROCm builds
cuMem*virtual-memory allocator path (HAVE_CUDA_FABRIC)cpp.has_header_symbol('cuda.h', 'CU_MEM_HANDLE_TYPE_FABRIC')naturally fails on HIP, so the build falls through to thecudaMalloc/hipMallocpathRuntime 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: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. Sameionicdriver issue we saw with the simplervram_testin 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=truetoolchain.Once PR1 merges, this PR will be rebased onto main with no diff change.
Out of scope (intentional)
cuMem*virtual-memory path on HIP — would unlock the--enable_vmmmode. ThecuMemCreate/cuMemAddressReserve/cuMemSetAccessblock innixl_worker.cpp:432-471is gated onHAVE_CUDA_FABRICwhich fails on HIP. If desired, follow-up could extend the translations + addCU_MEM_HANDLE_TYPE_FABRICaliasing.nvshmemworker but for ROCm. Separate plugin if NIXL maintainers want it.Test plan
use_rocm=true(gfx950, ROCm 7.2.0, container)ldd build/nixlbench | grep amdhip64→libamdhip64.so.7--runtime_type ASIO, 50 iter, 4 KiB → 64 MiB block sweep — passes cleanly🤖 Generated with Claude Code
Summary by CodeRabbit