diff --git a/src/plugins/libfabric/libfabric_backend.cpp b/src/plugins/libfabric/libfabric_backend.cpp index 2998cc82..6b66c171 100644 --- a/src/plugins/libfabric/libfabric_backend.cpp +++ b/src/plugins/libfabric/libfabric_backend.cpp @@ -76,6 +76,110 @@ nrtQueryAddr(const void *va, std::string *efa_bdf) { return -1; } +// ROCr (AMD GPU) runtime library loading +void * +dlopen_libhsa() { + // Try libhsa-runtime64.so first (HSA Runtime) + static void *handle = dlopen("libhsa-runtime64.so.1", RTLD_NOW | RTLD_LAZY); + if (handle) { + return handle; + } + // Fallback to versioned library + handle = dlopen("libhsa-runtime64.so", RTLD_NOW | RTLD_LAZY); + return handle; +} + +void * +dlopen_libhip() { + // Try libamdhip64.so (HIP Runtime) as alternative + static void *handle = dlopen("libamdhip64.so.6", RTLD_NOW | RTLD_LAZY); + if (handle) { + return handle; + } + // Fallback to unversioned library + handle = dlopen("libamdhip64.so", RTLD_NOW | RTLD_LAZY); + return handle; +} + +template +Fn * +_load_hsa_symbol(const char *fn_name, Fn *) { + void *hsa_handle = dlopen_libhsa(); + if (hsa_handle) { + return reinterpret_cast(dlsym(hsa_handle, fn_name)); + } + return nullptr; +} + +template +Fn * +_load_hip_symbol(const char *fn_name, Fn *) { + void *hip_handle = dlopen_libhip(); + if (hip_handle) { + return reinterpret_cast(dlsym(hip_handle, fn_name)); + } + return nullptr; +} + +#define LOAD_HSA_SYMBOL(sym) _load_hsa_symbol(#sym, &sym) +#define LOAD_HIP_SYMBOL(sym) _load_hip_symbol(#sym, &sym) + +// HIP API function signatures for dynamic loading +using hipGetDeviceProperties_fn = int (*)(void *prop, int device); +using hipPointerGetAttribute_fn = int (*)(void *data, int attribute, const void *ptr); +using hipDeviceGetPCIBusId_fn = int (*)(char *pciBusId, int len, int device); + +// ROCr (AMD GPU) memory address query using HIP APIs +int +rocrQueryAddr(const void *va, std::string *efa_bdf) { + // Strategy: Use HIP runtime to query PCI bus ID from memory address + // HIP API: hipPointerGetAttribute -> get device ID -> hipDeviceGetPCIBusId + + // Load HIP symbols dynamically + hipPointerGetAttribute_fn hipPointerGetAttribute = nullptr; + hipDeviceGetPCIBusId_fn hipDeviceGetPCIBusId = nullptr; + + void *hip_handle = dlopen_libhip(); + if (hip_handle) { + hipPointerGetAttribute = reinterpret_cast( + dlsym(hip_handle, "hipPointerGetAttribute")); + hipDeviceGetPCIBusId = reinterpret_cast( + dlsym(hip_handle, "hipDeviceGetPCIBusId")); + } + + if (!hipPointerGetAttribute || !hipDeviceGetPCIBusId) { + // HIP library not available - this is acceptable, fall back to all rails + NIXL_TRACE << "HIP runtime library not available - using all rails for AMD GPU memory"; + return -1; + } + + // Query device ID from memory pointer + int device_id = -1; + // hipPointerAttribute_t::device = 2 + constexpr int hipPointerAttributeDevice = 2; + int ret = hipPointerGetAttribute(&device_id, hipPointerAttributeDevice, va); + if (ret != 0 || device_id < 0) { + NIXL_TRACE << "Failed to query device ID from memory address " << va + << " - using all rails"; + return -1; + } + + // Query PCI bus ID from device ID + char pci_bus_id[64]; + ret = hipDeviceGetPCIBusId(pci_bus_id, sizeof(pci_bus_id), device_id); + if (ret != 0) { + NIXL_TRACE << "Failed to query PCI bus ID for AMD GPU device " << device_id + << " - using all rails"; + return -1; + } + + // Format PCI bus ID (HIP returns format like "0000:59:00.0") + efa_bdf->assign(pci_bus_id); + NIXL_DEBUG << "ROCr query: memory " << va << " -> device " << device_id + << " -> PCI " << *efa_bdf; + return 0; +} + } // namespace #ifdef HAVE_CUDA @@ -301,6 +405,7 @@ nixlLibfabricEngine::nixlLibfabricEngine(const nixlBackendInitParams *init_param NIXL_INFO << "System runtime: " << (runtime_ == FI_HMEM_CUDA ? "CUDA" : + runtime_ == FI_HMEM_ROCR ? "ROCr" : runtime_ == FI_HMEM_NEURON ? "NEURON" : "SYSTEM"); @@ -727,7 +832,7 @@ nixlLibfabricEngine::registerMem(const nixlBlobDesc &mem, // Use system runtime type to determine device-specific operations if (nixl_mem == VRAM_SEG) { #ifdef HAVE_CUDA - if (runtime_ == FI_HMEM_CUDA) { + if (runtime_ == FI_HMEM_CUDA || runtime_ == FI_HMEM_ROCR) { // CUDA-specific address query // For multi-GPU support, skip CUDA address workaround if (cuda_addr_wa_) { @@ -766,6 +871,19 @@ nixlLibfabricEngine::registerMem(const nixlBlobDesc &mem, NIXL_DEBUG << "Queried PCI bus ID: " << pci_bus_id << " for GPU " << mem.devId; } #endif + if (runtime_ == FI_HMEM_ROCR) { + // AMD ROCr-specific address query + int ret = rocrQueryAddr((void *)mem.addr, &pci_bus_id); + if (ret) { + NIXL_TRACE << "ROCr memory address query not available - using all rails for AMD GPU " + << mem.devId; + // Fall back to all rails - this is acceptable for initial enablement + // Future optimization: Implement rocrQueryAddr using HIP/HSA APIs + } else { + NIXL_DEBUG << "Queried PCI bus ID: " << pci_bus_id << " for AMD GPU " + << mem.devId; + } + } if (runtime_ == FI_HMEM_NEURON) { // Neuron-specific address query int ret = nrtQueryAddr((void *)mem.addr, &pci_bus_id); diff --git a/src/plugins/libfabric/libfabric_backend.h b/src/plugins/libfabric/libfabric_backend.h index 912e7255..d153e72a 100644 --- a/src/plugins/libfabric/libfabric_backend.h +++ b/src/plugins/libfabric/libfabric_backend.h @@ -38,9 +38,17 @@ #include "libfabric/libfabric_common.h" #ifdef HAVE_CUDA +#ifdef __HIP_PLATFORM_AMD__ +#include +#include +// Define CUDA types as HIP equivalents for AMD +typedef hipCtx_t CUcontext; +typedef hipDevice_t CUdevice; +#else #include #include #endif +#endif // Forward declarations class nixlLibfabricEngine; diff --git a/src/plugins/libfabric/meson.build b/src/plugins/libfabric/meson.build index 1fdb6fb7..97cfa60f 100644 --- a/src/plugins/libfabric/meson.build +++ b/src/plugins/libfabric/meson.build @@ -16,6 +16,14 @@ # LibFabric plugin configuration +# Hipify sources that include cuda_runtime.h for ROCm/HIP builds +hipify_cmd = find_program('hipify-perl') +hipify_src = generator(hipify_cmd, + output : ['@BASENAME@_hip.cpp'], + arguments : ['@INPUT@', '@EXTRA_ARGS@', '@OUTPUT@']) + +libfabric_backend_hip_src = hipify_src.process('libfabric_backend.cpp', extra_args: '-o') + # Enable libfabric utils layer libfabric_plugin_deps = [ nixl_infra, @@ -38,7 +46,7 @@ endif if 'LIBFABRIC' in static_plugins libfabric_backend_lib = static_library( 'LIBFABRIC', - 'libfabric_backend.cpp', + libfabric_backend_hip_src, 'libfabric_backend.h', 'libfabric_plugin.cpp', dependencies: libfabric_plugin_deps, @@ -50,7 +58,7 @@ if 'LIBFABRIC' in static_plugins else libfabric_backend_lib = shared_library( 'LIBFABRIC', - 'libfabric_backend.cpp', + libfabric_backend_hip_src, 'libfabric_backend.h', 'libfabric_plugin.cpp', dependencies: libfabric_plugin_deps, diff --git a/src/utils/libfabric/libfabric_rail.cpp b/src/utils/libfabric/libfabric_rail.cpp index 9b8a64c6..4311c041 100644 --- a/src/utils/libfabric/libfabric_rail.cpp +++ b/src/utils/libfabric/libfabric_rail.cpp @@ -1285,6 +1285,13 @@ nixlLibfabricRail::registerMemory(void *buffer, mr_attr.device.cuda = device_id; NIXL_DEBUG << "CUDA memory registration - iface: FI_HMEM_CUDA, device.cuda: " << device_id; + } else if (iface == FI_HMEM_ROCR) { + // AMD ROCr memory registration + // ROCr uses HSA agent handles for device identification + // The device_id corresponds to the GPU index (0-based) + mr_attr.device.rocr = device_id; + NIXL_DEBUG << "ROCr memory registration - iface: FI_HMEM_ROCR, device.rocr: " + << device_id; } else if (iface == FI_HMEM_NEURON) { /* * Store a sentinel; libfabric requires this to be initialized. diff --git a/src/utils/libfabric/libfabric_rail_manager.cpp b/src/utils/libfabric/libfabric_rail_manager.cpp index 7d9b9c04..c37faed1 100644 --- a/src/utils/libfabric/libfabric_rail_manager.cpp +++ b/src/utils/libfabric/libfabric_rail_manager.cpp @@ -51,6 +51,9 @@ nixlLibfabricRailManager::nixlLibfabricRailManager(size_t striping_threshold) runtime_ = FI_HMEM_CUDA; NIXL_INFO << "System runtime: CUDA for " << topology->getNumNvidiaAccel() << " NVIDIA GPU(s)"; + } else if (topology->getNumAmdAccel() > 0) { + runtime_ = FI_HMEM_ROCR; + NIXL_INFO << "System runtime: ROCr for " << topology->getNumAmdAccel() << " AMD GPU(s)"; } else if (topology->getNumAwsAccel() > 0) { runtime_ = FI_HMEM_NEURON; NIXL_INFO << "System runtime: NEURON for " << topology->getNumAwsAccel() diff --git a/src/utils/libfabric/libfabric_rail_manager.h b/src/utils/libfabric/libfabric_rail_manager.h index b2294170..150d0897 100644 --- a/src/utils/libfabric/libfabric_rail_manager.h +++ b/src/utils/libfabric/libfabric_rail_manager.h @@ -28,9 +28,13 @@ #include "libfabric_rail.h" #ifdef HAVE_CUDA +#ifdef __HIP_PLATFORM_AMD__ +#include +#else #include #include #endif +#endif // Forward declarations class nixlLibfabricTopology; diff --git a/src/utils/libfabric/libfabric_topology.cpp b/src/utils/libfabric/libfabric_topology.cpp index eab2f263..133eefcb 100644 --- a/src/utils/libfabric/libfabric_topology.cpp +++ b/src/utils/libfabric/libfabric_topology.cpp @@ -29,12 +29,17 @@ #include #ifdef HAVE_CUDA +#ifdef __HIP_PLATFORM_AMD__ +#include +#else #include #endif +#endif nixlLibfabricTopology::nixlLibfabricTopology() : num_aws_accel(0), num_nvidia_accel(0), + num_amd_accel(0), num_numa_nodes(0), num_devices(0), topology_discovered(false), @@ -86,8 +91,8 @@ nixlLibfabricTopology::discoverTopology() { NIXL_ERROR << "Failed to discover hwloc topology"; return status; } - // Build nVidia accelerator to EFA mapping based on PCIe topology - if (num_nvidia_accel > 0) { + // Build accelerator to EFA mapping based on PCIe topology + if (num_nvidia_accel > 0 || num_amd_accel > 0) { status = buildAccelToEfaMapping(); if (status != NIXL_SUCCESS) { NIXL_ERROR << "Failed to build accelerator to EFA mapping"; @@ -95,16 +100,25 @@ nixlLibfabricTopology::discoverTopology() { } } } else { - // For TCP/sockets devices, bypass complex topology discovery + // For non-EFA devices, use simplified topology discovery NIXL_INFO << "Using simplified topology for " << provider_name - << " devices (no topology mapping needed)"; + << " devices (no device-to-fabric mapping needed)"; - // Set basic values without hwloc discovery - num_aws_accel = 0; // TCP doesn't need accelerator topology - num_numa_nodes = 1; // Simple fallback + // Still discover GPUs even in simplified mode for GPU memory registration + status = initHwlocTopology(); + if (status == NIXL_SUCCESS) { + status = discoverAccelWithHwloc(); + if (status != NIXL_SUCCESS) { + NIXL_WARN << "GPU discovery failed in simplified topology mode"; + // Not a fatal error - continue without GPUs + } + cleanupHwlocTopology(); + } else { + NIXL_WARN << "hwloc initialization failed - no GPU detection available"; + } - // For TCP/sockets devices, no accelerator-mapping required. - NIXL_INFO << "TCP devices available globally - no accelerator-specific mapping required"; + num_numa_nodes = 1; // Simple fallback + NIXL_INFO << "Network devices available globally - no GPU-to-network mapping"; } topology_discovered = true; NIXL_TRACE << "Topology discovery completed successfully"; @@ -189,7 +203,9 @@ void nixlLibfabricTopology::printTopologyInfo() const { NIXL_TRACE << "=== Libfabric Topology Information ==="; NIXL_TRACE << "Topology discovered: " << (topology_discovered ? "Yes" : "No"); - NIXL_TRACE << "Number of AWS accelerators: " << num_aws_accel; + NIXL_TRACE << "Number of NVIDIA accelerators: " << num_nvidia_accel; + NIXL_TRACE << "Number of AMD accelerators: " << num_amd_accel; + NIXL_TRACE << "Number of AWS Neuron accelerators: " << num_aws_accel; NIXL_TRACE << "Number of NUMA nodes: " << num_numa_nodes; NIXL_TRACE << "Number of EFA devices: " << num_devices; NIXL_TRACE << "EFA devices: "; @@ -215,7 +231,9 @@ std::string nixlLibfabricTopology::getTopologyString() const { std::stringstream ss; ss << "Libfabric Topology: "; - ss << "AWS_Accelerators=" << num_aws_accel << ", "; + ss << "NVIDIA_GPUs=" << num_nvidia_accel << ", "; + ss << "AMD_GPUs=" << num_amd_accel << ", "; + ss << "Neuron_Accelerators=" << num_aws_accel << ", "; ss << "NUMA=" << num_numa_nodes << ", "; ss << "EFA=" << num_devices << ", "; ss << "Discovered=" << (topology_discovered ? "Yes" : "No"); @@ -328,29 +346,39 @@ nixl_status_t nixlLibfabricTopology::discoverAccelWithHwloc() { num_aws_accel = 0; num_nvidia_accel = 0; + num_amd_accel = 0; // Find all PCI devices and log detailed information - static const char *vendor_names[2] = {"NEURON", "NVIDIA"}; hwloc_obj_t pci_obj = nullptr; while ((pci_obj = hwloc_get_next_pcidev(hwloc_topology, pci_obj)) != nullptr) { const bool is_nvidia_accel = isNvidiaAccel(pci_obj); - if (is_nvidia_accel || isNeuronAccel(pci_obj)) { + const bool is_neuron_accel = isNeuronAccel(pci_obj); + const bool is_amd_accel = isAmdAccel(pci_obj); + + if (is_nvidia_accel || is_neuron_accel || is_amd_accel) { std::string pcie_addr = getPcieAddressFromHwlocObj(pci_obj); // Get device and vendor info uint16_t vendor_id = pci_obj->attr->pcidev.vendor_id; uint16_t device_id = pci_obj->attr->pcidev.device_id; uint16_t class_id = pci_obj->attr->pcidev.class_id; - NIXL_TRACE << "Found " << vendor_names[is_nvidia_accel] << " accelerator " - << num_aws_accel << ": " << pcie_addr << " (vendor=" << std::hex << vendor_id - << ", device=" << device_id << ", class=" << class_id << std::dec << ")"; + const char *vendor_name = is_nvidia_accel ? "NVIDIA" : is_amd_accel ? "AMD" : "NEURON"; - num_aws_accel++; - num_nvidia_accel += is_nvidia_accel; + NIXL_TRACE << "Found " << vendor_name << " accelerator: " << pcie_addr + << " (vendor=" << std::hex << vendor_id << ", device=" << device_id + << ", class=" << class_id << std::dec << ")"; + + if (is_nvidia_accel) { + num_nvidia_accel++; + } else if (is_amd_accel) { + num_amd_accel++; + } else { + num_aws_accel++; + } } } - NIXL_TRACE << "Discovered " << num_aws_accel << " " - << vendor_names[num_aws_accel == num_nvidia_accel] << " devices via hwloc"; + NIXL_TRACE << "Discovered " << num_nvidia_accel << " NVIDIA, " << num_amd_accel << " AMD, and " + << num_aws_accel << " Neuron accelerators via hwloc"; // If we found more than 8 NVIDIA accelerators on P5en, investigate further if (num_nvidia_accel > 8) { @@ -514,10 +542,10 @@ nixlLibfabricTopology::buildTopologyAwareGrouping() { NIXL_WARN << "Could not find hwloc object for PCIe address: " << pcie_addr; } } - // Step 2: Discover accelerators + // Step 2: Discover accelerators (NVIDIA and AMD) hwloc_obj_t pci_obj = nullptr; while ((pci_obj = hwloc_get_next_pcidev(hwloc_topology, pci_obj)) != nullptr) { - if (isNvidiaAccel(pci_obj)) { + if (isNvidiaAccel(pci_obj) || isAmdAccel(pci_obj)) { AccelInfo accel; accel.hwloc_node = pci_obj; accel.domain_id = pci_obj->attr->pcidev.domain; @@ -643,6 +671,22 @@ nixlLibfabricTopology::isNeuronAccel(hwloc_obj_t obj) const { obj->attr->pcidev.device_id) != std::end(NEURON_DEVICE_IDS); } +bool +nixlLibfabricTopology::isAmdAccel(hwloc_obj_t obj) const { + if (!obj || obj->type != HWLOC_OBJ_PCI_DEVICE) { + return false; + } + // AMD vendor ID is 0x1002 + if (obj->attr->pcidev.vendor_id != 0x1002) { + return false; + } + // Only count devices with GPU class (0x300-0x3ff for display controllers) + // Class 0x302 is 3D controller (GPU), 0x680 is other devices (network, etc.) + // MI300X uses class 0x1200 (Processing accelerators), consumer GPUs use 0x300-0x3ff + uint16_t class_id = obj->attr->pcidev.class_id; + return (class_id >= 0x300 && class_id < 0x400) || (class_id == 0x1200); +} + bool nixlLibfabricTopology::isEfaDevice(hwloc_obj_t obj) const { if (!obj || obj->type != HWLOC_OBJ_PCI_DEVICE) { diff --git a/src/utils/libfabric/libfabric_topology.h b/src/utils/libfabric/libfabric_topology.h index 09dbeec1..78abc941 100644 --- a/src/utils/libfabric/libfabric_topology.h +++ b/src/utils/libfabric/libfabric_topology.h @@ -44,6 +44,7 @@ class nixlLibfabricTopology { // System information int num_aws_accel; // AWS Trainium accelerators int num_nvidia_accel; // NVIDIA GPU accelerators + int num_amd_accel; // AMD GPU accelerators int num_numa_nodes; int num_devices; @@ -122,6 +123,8 @@ class nixlLibfabricTopology { bool isNeuronAccel(hwloc_obj_t obj) const; bool + isAmdAccel(hwloc_obj_t obj) const; + bool isEfaDevice(hwloc_obj_t obj) const; public: @@ -143,6 +146,11 @@ class nixlLibfabricTopology { return num_nvidia_accel; } + int + getNumAmdAccel() const { + return num_amd_accel; + } + const std::vector & getAllDevices() const { return all_devices; @@ -164,7 +172,13 @@ class nixlLibfabricTopology { enum fi_hmem_iface getMrAttrIface(int device_id) const { - return (device_id < num_nvidia_accel) ? FI_HMEM_CUDA : FI_HMEM_NEURON; + if (device_id < num_nvidia_accel) { + return FI_HMEM_CUDA; + } else if (device_id < num_nvidia_accel + num_amd_accel) { + return FI_HMEM_ROCR; + } else { + return FI_HMEM_NEURON; + } } // Debug/info diff --git a/src/utils/libfabric/meson.build b/src/utils/libfabric/meson.build index 67eb3696..35d0d7a8 100644 --- a/src/utils/libfabric/meson.build +++ b/src/utils/libfabric/meson.build @@ -14,14 +14,22 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Hipify sources that include cuda_runtime.h for ROCm/HIP builds +hipify_cmd = find_program('hipify-perl') +hipify_src = generator(hipify_cmd, + output : ['@BASENAME@_hip.cpp'], + arguments : ['@INPUT@', '@EXTRA_ARGS@', '@OUTPUT@']) + +libfabric_topology_hip_src = hipify_src.process('libfabric_topology.cpp', extra_args: '-o') +libfabric_rail_manager_hip_src = hipify_src.process('libfabric_rail_manager.cpp', extra_args: '-o') + # Source files -libfabric_utils_sources = files( +libfabric_utils_sources = [ 'libfabric_rail.cpp', - 'libfabric_rail_manager.cpp', 'libfabric_common.cpp', - 'libfabric_topology.cpp', - # More implementation files will be added as we create them -) + libfabric_topology_hip_src, + libfabric_rail_manager_hip_src, +] # Header files libfabric_utils_headers = files( diff --git a/test/unit/utils/libfabric/libfabric_topology_test.cpp b/test/unit/utils/libfabric/libfabric_topology_test.cpp index 6bb4cfe2..b84d8699 100644 --- a/test/unit/utils/libfabric/libfabric_topology_test.cpp +++ b/test/unit/utils/libfabric/libfabric_topology_test.cpp @@ -21,8 +21,12 @@ #include "common/nixl_log.h" #ifdef CUDA_FOUND +#ifdef __HIP_PLATFORM_AMD__ +#include +#else #include #endif +#endif int main() { @@ -39,23 +43,33 @@ main() { topology.printTopologyInfo(); // Test GPU-specific queries only if GPUs are detected - int num_gpus = topology.getNumNvidiaAccel(); + int num_gpus = topology.getNumNvidiaAccel() + topology.getNumAmdAccel(); if (num_gpus > 0) { NIXL_INFO << "3. Testing GPU-specific queries (detected " << num_gpus << " GPUs)..."; int test_gpus = std::min(num_gpus, 3); // Test up to 3 GPUs or all available for (int gpu_id = 0; gpu_id < test_gpus; ++gpu_id) { #ifdef CUDA_FOUND // Get PCI bus ID for this GPU + char pci_bus_id[32]; +#ifdef __HIP_PLATFORM_AMD__ + // For AMD GPUs, use hipDeviceGetPCIBusId which returns formatted string + hipError_t err = hipDeviceGetPCIBusId(pci_bus_id, sizeof(pci_bus_id), gpu_id); + if (err != hipSuccess) { + NIXL_WARN << "Failed to get PCI bus ID for GPU " << gpu_id; + continue; + } +#else + // For NVIDIA GPUs, get device properties and format PCI bus ID cudaDeviceProp prop; - cudaGetDeviceProperties(&prop, gpu_id); + (void)cudaGetDeviceProperties(&prop, gpu_id); - char pci_bus_id[32]; snprintf(pci_bus_id, sizeof(pci_bus_id), "%04x:%02x:%02x.0", prop.pciDomainID, prop.pciBusID, prop.pciDeviceID); +#endif auto gpu_devices = topology.getEfaDevicesForPci(pci_bus_id); diff --git a/test/unit/utils/libfabric/meson.build b/test/unit/utils/libfabric/meson.build index 85f8528b..e47810b5 100644 --- a/test/unit/utils/libfabric/meson.build +++ b/test/unit/utils/libfabric/meson.build @@ -14,6 +14,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Hipify sources that include cuda_runtime.h for ROCm/HIP builds +hipify_cmd = find_program('hipify-perl') +hipify_src = generator(hipify_cmd, + output : ['@BASENAME@_hip.cpp'], + arguments : ['@INPUT@', '@EXTRA_ARGS@', '@OUTPUT@']) + +libfabric_topology_test_hip_src = hipify_src.process('libfabric_topology_test.cpp', extra_args: '-o') + libfabric_utils_dep = [ libfabric_dep, nixl_common_deps ] libfabric_test_cpp_args = [] @@ -25,7 +33,7 @@ endif if get_option('buildtype') != 'release' libfabric_topology_test_bin = executable('libfabric_topology_test', - 'libfabric_topology_test.cpp', + libfabric_topology_test_hip_src, dependencies: libfabric_utils_dep, include_directories: [nixl_inc_dirs, utils_inc_dirs], link_with: libfabric_utils_lib,