Skip to content

libfabric: add AMD/ROCm HMEM support for CXI-attached accelerators - #1873

Closed
ryanhankins wants to merge 0 commit into
ai-dynamo:mainfrom
ryanhankins:main
Closed

ryanhankins wants to merge 0 commit into
ai-dynamo:mainfrom
ryanhankins:main

Conversation

@ryanhankins

@ryanhankins ryanhankins commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

Replaces #1771 due to branch history overwrite.

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 Add AMD ROCm/HIP build support for nixlbench (follow-up to #1642) #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.

Summary by CodeRabbit

  • New Features

    • Added optional ROCm/AMD GPU support alongside CUDA, with configurable ROCm installation settings.
    • Extended topology discovery and reporting to detect AMD accelerators.
    • Added ROCm/HIP VRAM context management and GPU pointer handling for VRAM-based memory operations.
  • Bug Fixes

    • Prevented CUDA/UCX GPU feature detection from running in ROCm builds.
    • Added validation for ROCm device pointers and device IDs, reporting invalid targets instead of proceeding.

@ryanhankins
ryanhankins requested review from a team, amitrad-aws and fengjica as code owners July 1, 2026 14:16
@copy-pr-bot

copy-pr-bot Bot commented Jul 1, 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

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

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

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

🚀

@coderabbitai

coderabbitai Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds ROCm/HIP as a CUDA alternative through Meson configuration, LibFabric HIP context and VRAM registration support, AMD accelerator topology discovery, and ROCm-aware rail manager runtime selection.

Changes

ROCm/HIP Build Support

Layer / File(s) Summary
Build options and Meson wiring
meson_options.txt, meson.build, src/plugins/libfabric/meson.build, src/utils/libfabric/meson.build
Adds ROCm selection and path options, discovers ROCm dependencies, emits ROCm compile defines, aliases the dependency for downstream checks, and skips CUDA-specific UCX detection.
ROCm context declarations
src/plugins/libfabric/libfabric_backend.h
Adds ROCm device identifiers, HIP declarations, context APIs, engine state, and shared VRAM initialization declarations.
ROCm context and VRAM registration
src/plugins/libfabric/libfabric_backend.cpp
Queries HIP pointer attributes, validates device metadata, activates HIP devices, initializes ROCm runtime state, and registers ROCm VRAM memory.
Rail manager runtime and registration
src/utils/libfabric/libfabric_rail_manager.cpp
Gates accelerator runtime selection by compile-time support and uses the selected runtime for VRAM registration.
AMD accelerator topology support
src/utils/libfabric/libfabric_topology.h, src/utils/libfabric/libfabric_topology.cpp
Adds AMD accelerator classification and counting, extends topology discovery, reporting, serialization, and grouping, and removes the obsolete interface helper.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant nixlLibfabricEngine
  participant HIPRuntime
  participant nixlLibfabricRocmCtx
  participant nixlLibfabricRailManager
  nixlLibfabricEngine->>HIPRuntime: query pointer attributes
  HIPRuntime-->>nixlLibfabricEngine: return device and PCI metadata
  nixlLibfabricEngine->>nixlLibfabricRocmCtx: validate and update device context
  nixlLibfabricRocmCtx->>HIPRuntime: hipSetDevice
  nixlLibfabricEngine->>nixlLibfabricRailManager: register VRAM memory
Loading

Suggested reviewers: aranadive, akkart-aws

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 32.14% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: adding AMD/ROCm HMEM support for libfabric with CXI-attached accelerators.
Description check ✅ Passed The description explains what changed, why it is needed, and how the build, backend, topology, and rail-manager updates implement it.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/plugins/libfabric/libfabric_backend.cpp`:
- Around line 372-389: The ROCm device tracking in
libfabric_backend::registerAddress currently latches devId_ once and rejects
later valid buffers from a different AMD GPU with NIXL_ERR_MISMATCH. Update the
logic after rocmQueryAddr(address) and the expected_dev checks so each validated
VRAM pointer can refresh devId_ to the current expected_dev instead of only
setting it when devId_ is kInvalidRocmDeviceId. Keep the existing validation for
non-device memory and mismatched queried device IDs, but remove the cross-device
rejection caused by the stored devId_.
- Around line 897-900: The ROCm conditional branch in libfabric_backend should
be reformatted to use the standard 4-space indentation. Adjust the body of the
FI_HMEM_ROCR check in the code around the runtime_ branch so the NIXL_DEBUG call
and mems.push_back(VRAM_SEG) are indented consistently beneath the if statement,
matching the surrounding style in libfabric_backend.cpp and the CodeStyle.md
requirement.

In `@src/plugins/libfabric/libfabric_backend.h`:
- Around line 88-116: The ROCm identifiers in nixlLibfabricRocmCtx need to be
renamed to match backend naming rules and used consistently across the header
and implementation: change RocmDeviceId to a *_t-style enum class name, rename
kInvalidRocmDeviceId to snake_case, and update the private member and any
context symbol usages such as devId_ and rocmCtx_ to the required
trailing-underscore snake_case form. Make the same naming updates wherever these
symbols are referenced in the .cpp so the API and implementation stay aligned.

In `@src/utils/libfabric/libfabric_rail_manager.cpp`:
- Around line 782-784: The VRAM registration path in libfabric_rail_manager.cpp
is always using the constructor-selected runtime_ as the fi_hmem_iface, which
can be wrong for buffers from different accelerator runtimes. Update the VRAM
branch in the registration logic around the iface selection so it derives the
iface from the specific buffer/device context instead of blindly reusing
runtime_, using the existing buffer/runtime metadata or device_pci_bus_id
association before assigning mr_attr.iface.
- Around line 213-215: The AMD accelerator branch in the libfabric rail manager
is not indented consistently inside the topology->getNumAmdAccel() conditional.
Update the body in the relevant if block within the libfabric_rail_manager logic
so the runtime_ assignment and NIXL_INFO logging are indented with 4 spaces
relative to the if statement, matching the surrounding formatting style.

In `@src/utils/libfabric/libfabric_topology.h`:
- Line 47: Rename the new private AMD counter in libfabric_topology to follow
the class’s private member convention: update num_amd_accel to camelCase with a
trailing underscore (for example, numAmdAccel_) and adjust any references in the
related libfabric topology code so the member name is consistent everywhere.
- Around line 217-220: Add a Doxygen block comment for the new public API
getNumAmdAccel() in libfabric_topology.h, using the same style as the other
public getters/types in the LibfabricTopology class. Document the purpose of the
method and what num_amd_accel represents, placing the comment directly above
getNumAmdAccel() so the public interface follows the project’s Doxygen
convention.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 271df797-853b-4e56-90d2-22ab45e57626

📥 Commits

Reviewing files that changed from the base of the PR and between 78985be and 953af65.

📒 Files selected for processing (9)
  • meson.build
  • meson_options.txt
  • src/plugins/libfabric/libfabric_backend.cpp
  • src/plugins/libfabric/libfabric_backend.h
  • src/plugins/libfabric/meson.build
  • src/utils/libfabric/libfabric_rail_manager.cpp
  • src/utils/libfabric/libfabric_topology.cpp
  • src/utils/libfabric/libfabric_topology.h
  • src/utils/libfabric/meson.build

Comment thread src/plugins/libfabric/libfabric_backend.cpp Outdated
Comment thread src/plugins/libfabric/libfabric_backend.cpp Outdated
Comment thread src/plugins/libfabric/libfabric_backend.h Outdated
Comment thread src/utils/libfabric/libfabric_rail_manager.cpp Outdated
Comment thread src/utils/libfabric/libfabric_rail_manager.cpp Outdated
Comment thread src/utils/libfabric/libfabric_topology.h Outdated
Comment thread src/utils/libfabric/libfabric_topology.h Outdated
@ryanhankins

Copy link
Copy Markdown
Contributor Author

@fengjica @amitrad-aws Would you please let me know if this looks ok?

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
meson.build (1)

481-488: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Don't add cuda to trace project args on ROCm builds

cuda_dep.found() is true when cuda_dep aliases rocm_dep, but CUDA is never enabled in that branch. That makes add_project_arguments(..., language: ['cpp', 'cuda']) fail for -Duse_rocm=true -Dwith_trace=true. Gate the cuda entry on actual CUDA language enablement.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@meson.build` around lines 481 - 488, Update the nixl_trace_enabled block in
the Meson configuration so nixl_trace_arg_langs includes 'cuda' only when the
CUDA language was actually enabled, not merely when cuda_dep.found() is true;
preserve 'cpp' unconditionally and use the existing CUDA enablement state to
avoid adding CUDA project arguments on ROCm builds.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/plugins/libfabric/libfabric_backend.cpp`:
- Around line 979-1006: registerMem’s ROCm path redundantly queries and
validates the pointer device through rocmUpdateCtxPtr after already obtaining
validated RocmAddrInfo. Add a lightweight
nixlLibfabricRocmCtx::setDevice(RocmDeviceId) method that only updates devId_,
and call it from registerMem after the existing rocmQueryAddr/device-match
checks; retain rocmUpdateCtxPtr’s query-and-validation behavior for other
callers.

---

Outside diff comments:
In `@meson.build`:
- Around line 481-488: Update the nixl_trace_enabled block in the Meson
configuration so nixl_trace_arg_langs includes 'cuda' only when the CUDA
language was actually enabled, not merely when cuda_dep.found() is true;
preserve 'cpp' unconditionally and use the existing CUDA enablement state to
avoid adding CUDA project arguments on ROCm builds.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 08f6bb69-1f0b-4fdf-963d-2d1ab7c4f14f

📥 Commits

Reviewing files that changed from the base of the PR and between a420b40 and 781bd24.

📒 Files selected for processing (9)
  • meson.build
  • meson_options.txt
  • src/plugins/libfabric/libfabric_backend.cpp
  • src/plugins/libfabric/libfabric_backend.h
  • src/plugins/libfabric/meson.build
  • src/utils/libfabric/libfabric_rail_manager.cpp
  • src/utils/libfabric/libfabric_topology.cpp
  • src/utils/libfabric/libfabric_topology.h
  • src/utils/libfabric/meson.build

Comment on lines +979 to +1006
#endif
#ifdef HAVE_ROCM
if (runtime_ == FI_HMEM_ROCR) {
const auto info = rocmQueryAddr(reinterpret_cast<void *>(mem.addr));
if (!info || !info->is_dev) {
NIXL_ERROR << "Failed to query ROCm device from memory "
<< reinterpret_cast<void *>(mem.addr);
return NIXL_ERR_BACKEND;
}
pci_bus_id = info->pci_bus_id;
if (info->dev_id != static_cast<RocmDeviceId>(mem.devId)) {
NIXL_ERROR << "ROCm pointer/device mismatch: pointer on GPU " << info->dev_id
<< ", metadata requests GPU " << mem.devId;
return NIXL_ERR_INVALID_PARAM;
}
nixl_status_t status =
rocmCtx_->rocmUpdateCtxPtr(reinterpret_cast<void *>(mem.addr), info->dev_id);
if (status != NIXL_SUCCESS) {
NIXL_ERROR << "Failed to update ROCm context for device " << info->dev_id;
return status;
}
status = rocmCtx_->rocmSetCtx();
if (status != NIXL_SUCCESS) {
NIXL_ERROR << "Failed to set ROCm device context for device " << info->dev_id;
return status;
}
NIXL_DEBUG << "Queried PCI bus ID: " << pci_bus_id << " for AMD GPU " << mem.devId;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Duplicate device query/validation between registerMem and rocmUpdateCtxPtr.

registerMem already calls rocmQueryAddr(mem.addr) and checks info->dev_id != mem.devId (lines 982-993), then immediately calls rocmCtx_->rocmUpdateCtxPtr(mem.addr, info->dev_id), which internally re-runs rocmQueryAddr (a second hipPointerGetAttributes driver call) and re-checks info->dev_id != expected_dev — a comparison that is now tautological since expected_dev was already derived from the same query. This duplicates both a driver round-trip and validation logic that could silently diverge if one copy is updated later without the other.

♻️ Proposed direction

Add a lightweight setter (e.g. nixlLibfabricRocmCtx::setDevice(RocmDeviceId)) that only updates devId_ without re-querying, and have registerMem call that instead of rocmUpdateCtxPtr once it has already validated the pointer/device match itself. Reserve rocmUpdateCtxPtr's full query+validate contract for callers that don't already have RocmAddrInfo.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/plugins/libfabric/libfabric_backend.cpp` around lines 979 - 1006,
registerMem’s ROCm path redundantly queries and validates the pointer device
through rocmUpdateCtxPtr after already obtaining validated RocmAddrInfo. Add a
lightweight nixlLibfabricRocmCtx::setDevice(RocmDeviceId) method that only
updates devId_, and call it from registerMem after the existing
rocmQueryAddr/device-match checks; retain rocmUpdateCtxPtr’s
query-and-validation behavior for other callers.

fengjica
fengjica previously approved these changes Jul 15, 2026

#ifdef HAVE_ROCM
/** ROCm/HIP device identifier. */
enum class RocmDeviceId : int {};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A valid id needs to be non-negative? I guess here it cannot be unsigned int, because -1 is used below.

@aranadive

Copy link
Copy Markdown
Contributor

@ryanhankins can we update PR with the fixes?

@brminich

Copy link
Copy Markdown
Contributor

@ryanhankins can you pls resolve conflicts?

@ryanhankins

Copy link
Copy Markdown
Contributor Author

Sorry, was out of town. I can certainly update, but what do we want to do with this? #1750 contains most of the work here. Shall I just close this? By the way, thank you so much for looking!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/utils/libfabric/libfabric_topology.h (1)

145-150: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Place the return type on a separate line.

Keep the declaration and definition in the required layout.

  • src/utils/libfabric/libfabric_topology.h#L145-L150: place bool below [[nodiscard]] for all accelerator predicates.
  • src/utils/libfabric/libfabric_topology.cpp#L788-L789: place bool below [[nodiscard]] for isAmdAccel.

As per path instructions, “Place return types on separate lines.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/utils/libfabric/libfabric_topology.h` around lines 145 - 150, Reformat
the accelerator predicate declarations in
src/utils/libfabric/libfabric_topology.h lines 145-150 so bool appears on its
own line below [[nodiscard]] for isNvidiaAccel, isNeuronAccel, and isAmdAccel.
Apply the same required layout to the isAmdAccel definition in
src/utils/libfabric/libfabric_topology.cpp lines 788-789.

Source: Path instructions

meson.build (1)

228-231: 🎯 Functional Correctness | 🔴 Critical | 🏗️ Heavy lift

Keep cuda_dep separate from rocm_dep.

When use_rocm is true, cuda_dep.found() becomes true. The following guard then calls add_languages('CUDA'), so ROCm-only configurations still require nvcc, contrary to the use_rocm option. Keep cuda_dep false when CUDA is unavailable. Use a separate accelerator dependency for libfabric and update CUDA-only consumers to use an explicit CUDA availability flag.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@meson.build` around lines 228 - 231, Remove the cuda_dep = rocm_dep alias so
cuda_dep remains independently false when CUDA is unavailable. Introduce a
separate accelerator dependency for libfabric, and update CUDA-only consumers
and the add_languages('CUDA') guard to use an explicit CUDA availability flag
rather than rocm_dep or cuda_dep.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@meson_options.txt`:
- Around line 29-32: Remove the duplicate rocm_path option from the Meson
options, retaining a single definition that combines both descriptions: the
general ROCm installation path behavior and its use for UCX unit tests.

---

Outside diff comments:
In `@meson.build`:
- Around line 228-231: Remove the cuda_dep = rocm_dep alias so cuda_dep remains
independently false when CUDA is unavailable. Introduce a separate accelerator
dependency for libfabric, and update CUDA-only consumers and the
add_languages('CUDA') guard to use an explicit CUDA availability flag rather
than rocm_dep or cuda_dep.

In `@src/utils/libfabric/libfabric_topology.h`:
- Around line 145-150: Reformat the accelerator predicate declarations in
src/utils/libfabric/libfabric_topology.h lines 145-150 so bool appears on its
own line below [[nodiscard]] for isNvidiaAccel, isNeuronAccel, and isAmdAccel.
Apply the same required layout to the isAmdAccel definition in
src/utils/libfabric/libfabric_topology.cpp lines 788-789.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 223eacf7-de55-4843-b445-de5d0601c084

📥 Commits

Reviewing files that changed from the base of the PR and between 781bd24 and bd56332.

📒 Files selected for processing (8)
  • meson.build
  • meson_options.txt
  • src/plugins/libfabric/libfabric_backend.cpp
  • src/plugins/libfabric/libfabric_backend.h
  • src/plugins/libfabric/meson.build
  • src/utils/libfabric/libfabric_rail_manager.cpp
  • src/utils/libfabric/libfabric_topology.cpp
  • src/utils/libfabric/libfabric_topology.h

Comment thread meson_options.txt Outdated
Comment on lines 29 to 32
option('use_rocm', type: 'boolean', value: false, description: 'Build against AMD ROCm/HIP instead of CUDA. When true, CUDA toolchain is not required.')
option('rocm_path', type: 'string', value: '', description: 'Path to ROCm installation directory (used only when use_rocm=true). Empty falls back to /opt/rocm.')
option('nixl_cuda_arch_list', type: 'string', value: 'auto', description: 'Comma-separated CUDA SM targets (e.g. 90,100), or auto to select defaults (sm_80+ normally, sm_90+ when build_nixl_ep is enabled). Use a single target like 100 for faster single-GPU builds.')
option('rocm_path', type: 'string', value: '', description: 'Path to ROCm installation for UCX unit tests (empty = do not use ROCm)')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Remove the duplicate rocm_path option.

Line 30 and Line 32 both define rocm_path. Meson configuration stops before any build when an option name is defined twice. Keep one definition and combine the required documentation.

Proposed fix
 option('use_rocm', type: 'boolean', value: false, description: 'Build against AMD ROCm/HIP instead of CUDA. When true, CUDA toolchain is not required.')
 option('rocm_path', type: 'string', value: '', description: 'Path to ROCm installation directory (used only when use_rocm=true). Empty falls back to /opt/rocm.')
-option('rocm_path', type: 'string', value: '', description: 'Path to ROCm installation for UCX unit tests (empty = do not use ROCm)')
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@meson_options.txt` around lines 29 - 32, Remove the duplicate rocm_path
option from the Meson options, retaining a single definition that combines both
descriptions: the general ROCm installation path behavior and its use for UCX
unit tests.

This branch was previously deployed

1 inactive deployment
SWX_AWS — 885c49d8 Deployed Aug 25, 2026 by ShahafMeir via Run AWS Tests #9069
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.

4 participants