Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c6fe342
test(rccl): add host microtests for the GIN host proxy
aduforest Oct 15, 2026
53517f8
test(rccl): address ARGUS review of the GIN host proxy microtests
aduforest Oct 15, 2026
ce9ba3c
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 16, 2026
488dabe
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 19, 2026
7c99f7c
test(rccl): guard the GIN DMA-BUF export fake and tests on HIP >= 7.0
aduforest Oct 19, 2026
84d01cb
test(rccl): link the shared HIP and logging fakes into the GIN host p…
aduforest Oct 19, 2026
caa3d4a
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 19, 2026
c754099
test(rccl): move the DMA-BUF export hook next to the other export sea…
aduforest Oct 19, 2026
a1d0df3
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 20, 2026
dfbfcd9
test(rccl): host-only suites declare num_gpus 0
aduforest Oct 21, 2026
12c7fdd
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 21, 2026
af1169b
test(rccl): address review on the GIN host proxy microtests
aduforest Oct 21, 2026
37937e7
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 21, 2026
842d79e
test(rccl): GIN host proxy microtests per review
aduforest Oct 22, 2026
2f5d178
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 22, 2026
b4fddeb
test(rccl): free what a failed GIN proxy CreateContext leaves behind …
aduforest Oct 22, 2026
d03e8e7
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 22, 2026
1045a3e
test(rccl): turn Won't Do bug pins into plain tests (pre-merge harden…
aduforest Oct 22, 2026
edb6f7f
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 24, 2026
87935e0
test(rccl): leave ci-precheckin.json to the CI owners
aduforest Oct 24, 2026
a4c3914
Merge remote-tracking branch 'origin/develop' into users/aduforest/ai…
aduforest Oct 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions projects/rccl/test/host/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,15 @@ function(rccl_define_micro_source_lists)
../common/main_altrsmi.cpp
PARENT_SCOPE)

# rccl-UnitTestsMicroGinHostProxy -- src/gin/gin_host_proxy.cc + src/gin/proxy_gpucontext/. Own
# binary: gin-plugin-init-test.cc in rccl-UnitTestsMicro defines ncclGinProxy and ncclGinProxyVersion.
set(TEST_MICRO_GIN_HOST_PROXY_SOURCE_FILES
gin-host-proxy-test.cc
fakes/hip_fakes.cc
fakes/nccl_fakes.cc
../common/main_altrsmi.cpp
PARENT_SCOPE)

# rccl-UnitTestsMicroClientSupport -- src/ras/client_support.cc. Its own binary: this test's
# inline stand-ins for ncclSocketsSameNode/rasPeerInfoToString/rasPeerToString (client_support.cc's
# callees into src/ras/peers.cc) collide with the REAL peers.cc compiled into rccl-UnitTestsMicro
Expand Down Expand Up @@ -1616,6 +1625,42 @@ rccl_add_micro_binary(rccl-UnitTestsMicroWarpSpeed
SYMMETRIC_SCHED_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/scheduler/symmetric_sched.cc"
CATEGORIES_YAML "${CMAKE_CURRENT_SOURCE_DIR}/../test_categories_micro_scheduler.yaml")

# ---------------------------------------------------------------------------
# rccl-UnitTestsMicroGinHostProxy
# ---------------------------------------------------------------------------
# In-build, RCCL_CUMEM_DMABUF_EXPORT_SUPPORTED arrives with rccl's own compile definitions; standalone
# repeats the top-level probe, so rocmwrap.h's NCCL_CUMEM_DMABUF_EXPORT_GATE matches what rccl compiles.
set(_MICRO_DMABUF_EXPORT_DEF "")
if(NOT BUILD_TESTS)
include(CheckCXXSymbolExists)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
set(CMAKE_REQUIRED_DEFINITIONS -D__HIP_PLATFORM_AMD__)
check_cxx_symbol_exists(hipMemGetHandleForAddressRange "hip/hip_runtime_api.h"
_MICRO_HIP_MEM_GET_HANDLE_FOR_ADDR_RANGE)
unset(CMAKE_REQUIRED_DEFINITIONS)
set(CMAKE_TRY_COMPILE_TARGET_TYPE EXECUTABLE)
if(_MICRO_HIP_MEM_GET_HANDLE_FOR_ADDR_RANGE)
set(_MICRO_DMABUF_EXPORT_DEF RCCL_CUMEM_DMABUF_EXPORT_SUPPORTED)
endif()
endif()
# The test redirects rocmwrap.cc's DmaBufEnable param; keep the name and default in step.
foreach(_f "${CMAKE_CURRENT_LIST_DIR}/../../src/misc/rocmwrap.cc" "${CMAKE_CURRENT_LIST_DIR}/gin-host-proxy-test.cc")
rccl_assert_source_line("${_f}" "NCCL_PARAM(DmaBufEnable, \"DMABUF_ENABLE\", 1)" "gin-host-proxy-test.cc")
endforeach()
rccl_add_micro_binary(rccl-UnitTestsMicroGinHostProxy
SOURCES ${TEST_MICRO_GIN_HOST_PROXY_SOURCE_FILES}
EXTRA_INCLUDES
${RCCL_HOST_HIPIFY_DIR}/src/include/plugin
${RCCL_HOST_HIPIFY_DIR}/src/include/nccl_device
EXTRA_DEFS
${_MICRO_MODE_DEFS}
${_MICRO_DMABUF_EXPORT_DEF}
GIN_HOST_PROXY_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/gin/gin_host_proxy.cc"
GPUCONTEXT_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/gin/proxy_gpucontext/gpucontext.cc"
GPUCONTEXT_V1_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/gin/proxy_gpucontext/gpucontext_v1.cc"
GPUCONTEXT_V2_CC_PATH="${RCCL_HOST_HIPIFY_DIR}/src/gin/proxy_gpucontext/gpucontext_v2.cc"
CATEGORIES_YAML "${CMAKE_CURRENT_SOURCE_DIR}/../test_categories_micro_gin_host_proxy.yaml")

# ---------------------------------------------------------------------------
# rccl-UnitTestsMicroInit and variants
# ---------------------------------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions projects/rccl/test/host/MICROTEST_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,12 @@ export colliding non-`static` symbols; otherwise a unit needs its own binary:
binaries cover both arms of both without a 2x2 cross product. init.cc compiles the *real* `argcheck.cc`/`archinfo.cc`/`utils.cc` ("oracle"
TUs) from the hipify tree rather than stubbing them; `--gc-sections` drops the
deep-path symbols the tests never reach. See `test_categories_micro_init.yaml`.
- **`rccl-UnitTestsMicroGinHostProxy`** — `gin/gin_host_proxy.cc` and the three
`gin/proxy_gpucontext/` writers (`GIN_HOST_PROXY_CC_PATH`, `GPUCONTEXT{,_V1,_V2}_CC_PATH`,
from `gin-host-proxy-test.cc`); suites `GinHostProxy*`, against the scripted RMA plugin in
`fakes/rma_vtable_fake.h`. Its own binary:
`gin-plugin-init-test.cc` in `rccl-UnitTestsMicro` defines `ncclGinProxy` and
`ncclGinProxyVersion`. See `test_categories_micro_gin_host_proxy.yaml`.
- **`rccl-UnitTestsMicroWarpSpeed`** — `allgatherv_sched.cc` +
`symmetric_sched.cc` (via `ALLGATHERV_SCHED_CC_PATH`/`SYMMETRIC_SCHED_CC_PATH`,
both from `scheduler-test.cc`); suite `SchedulerMicrotest.*`. Its own binary,
Expand Down Expand Up @@ -1063,6 +1069,7 @@ cmake --build build -j"$(nproc)"
./build/rccl-UnitTestsMicroEnqueue # enqueue.cc tests
./build/rccl-UnitTestsMicroEnqueue-devlinker # same, RCCL_DEVICE_LINKER arm
./build/rccl-UnitTestsMicroSymKernels # sym_kernels.cc tests
./build/rccl-UnitTestsMicroGinHostProxy # src/gin/gin_host_proxy.cc + proxy_gpucontext/
./build/rccl-UnitTestsMicroTaskPrep # src/enqueue/task_prep/ + task_sched/ tests
./build/rccl-UnitTestsMicroConnect # src/graph/connect.cc Preset/Postset tests
./build/rccl-UnitTestsMicroDiagnostics # src/diagnostics.cc + src/diagnostics/ tests
Expand Down
20 changes: 20 additions & 0 deletions projects/rccl/test/host/fakes/hip_fakes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ ASSERT_HOOK_MATCHES_PROD(g_hipMemGetAddressRange, hipMemGetAddressRange)
ASSERT_HOOK_MATCHES_PROD(g_hipIpcGetMemHandle, hipIpcGetMemHandle);
ASSERT_HOOK_MATCHES_PROD(g_hipMemRetainAllocationHandle, hipMemRetainAllocationHandle);
ASSERT_HOOK_MATCHES_PROD(g_hipMemExportToShareableHandle, hipMemExportToShareableHandle);
#if defined(RCCL_CUMEM_DMABUF_EXPORT_SUPPORTED)
ASSERT_HOOK_MATCHES_PROD(g_hipMemGetHandleForAddressRange, hipMemGetHandleForAddressRange);
#endif
ASSERT_HOOK_MATCHES_PROD(g_hipMemRelease, hipMemRelease);
ASSERT_HOOK_MATCHES_PROD(g_hipPointerGetAttribute, hipPointerGetAttribute);
ASSERT_HOOK_MATCHES_PROD(g_hipDriverGetVersion, hipDriverGetVersion);
Expand Down Expand Up @@ -412,6 +415,14 @@ std::function<hipError_t(void*, const void*, size_t, hipMemcpyKind, hipStream_t)
g_hipMemcpyAsync = DefaultHipMemcpyAsync;
std::function<hipError_t(void*, int, size_t, hipStream_t)> g_hipMemsetAsync = DefaultHipMemsetAsync;
std::function<hipError_t(void*, int, size_t)> g_hipMemset = DefaultHipMemset;
#if defined(RCCL_CUMEM_DMABUF_EXPORT_SUPPORTED)
static hipError_t DefaultHipMemGetHandleForAddressRange(void*, hipDeviceptr_t, size_t, hipMemRangeHandleType,
Comment thread
aduforest marked this conversation as resolved.
Resolved
unsigned long long) {
return hipErrorInvalidValue;
}
std::function<hipError_t(void*, hipDeviceptr_t, size_t, hipMemRangeHandleType, unsigned long long)>
g_hipMemGetHandleForAddressRange = DefaultHipMemGetHandleForAddressRange;
#endif
std::function<hipError_t(hipStream_t*, unsigned)> g_hipStreamCreateWithFlags = DefaultHipStreamCreateWithFlags;
std::function<hipError_t(hipStream_t)> g_hipStreamSynchronize = DefaultHipStreamSynchronize;
std::function<hipError_t(hipStream_t)> g_hipStreamDestroy = DefaultHipStreamDestroy;
Expand Down Expand Up @@ -676,6 +687,9 @@ void ResetHipFakes()
g_hipMemcpyAsync = DefaultHipMemcpyAsync;
g_hipMemsetAsync = DefaultHipMemsetAsync;
g_hipMemset = DefaultHipMemset;
#if defined(RCCL_CUMEM_DMABUF_EXPORT_SUPPORTED)
g_hipMemGetHandleForAddressRange = DefaultHipMemGetHandleForAddressRange;
#endif
g_hipStreamCreateWithFlags = DefaultHipStreamCreateWithFlags;
g_hipStreamSynchronize = DefaultHipStreamSynchronize;
g_hipStreamDestroy = DefaultHipStreamDestroy;
Expand All @@ -702,6 +716,12 @@ void ResetHipFakes()
// ===========================================================================

// --- hook-backed real symbols -------------------------------------------
#if defined(RCCL_CUMEM_DMABUF_EXPORT_SUPPORTED)
hipError_t hipMemGetHandleForAddressRange(void* handle, hipDeviceptr_t ptr, size_t size, hipMemRangeHandleType type,
unsigned long long flags) {
return g_hipMemGetHandleForAddressRange(handle, ptr, size, type, flags);
}
#endif
hipError_t hipMemGetAddressRange(hipDeviceptr_t* pbase, size_t* psize,
hipDeviceptr_t dptr)
{
Expand Down
7 changes: 7 additions & 0 deletions projects/rccl/test/host/fakes/hip_fakes.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ extern std::function<hipError_t(void* /*dst*/, int /*value*/, size_t /*bytes*/,
// hipSuccess -- the allocation seams hand out std::malloc'd host memory, so a
// buffer production zeroes is genuinely zero when a test reads it back.
extern std::function<hipError_t(void* /*dst*/, int /*value*/, size_t /*bytes*/)> g_hipMemset;
// The DMA-BUF export, where CMake's hipMemGetHandleForAddressRange probe found it (rocmwrap.h's
// NCCL_CUMEM_DMABUF_EXPORT_PROBE). The default fails with hipErrorInvalidValue.
#if defined(RCCL_CUMEM_DMABUF_EXPORT_SUPPORTED)
extern std::function<hipError_t(void* /*handle*/, hipDeviceptr_t /*ptr*/, size_t /*size*/,
hipMemRangeHandleType /*type*/, unsigned long long /*flags*/)>
g_hipMemGetHandleForAddressRange;
#endif

extern std::function<hipError_t(hipStream_t* /*stream*/, unsigned /*flags*/)> g_hipStreamCreateWithFlags;
extern std::function<hipError_t(hipStream_t /*stream*/)> g_hipStreamSynchronize;
Expand Down
256 changes: 256 additions & 0 deletions projects/rccl/test/host/fakes/rma_vtable_fake.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
/*************************************************************************
* Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved.
*
* See LICENSE.txt for license information
************************************************************************/

// One scripted ncclRma_t vtable for the host microtests that drive an RMA plugin. Every entry point records
// its arguments and returns its *Result knob; gin-host-proxy-test.cc is the first user.

#ifndef RCCL_TEST_HOST_RMA_VTABLE_FAKE_H_
#define RCCL_TEST_HOST_RMA_VTABLE_FAKE_H_

#include <cstdint>
#include <cstring>
#include <deque>
#include <set>
#include <utility>
#include <vector>

#include "nccl.h"
#include "plugin/nccl_rma.h"

struct FakeRmaVtable {
// The handles the plugin hands out.
static inline void* const kListenComm = reinterpret_cast<void*>(0x20);
static inline void* const kCollComm = reinterpret_cast<void*>(0x30);
static inline void* const kRmaCtx = reinterpret_cast<void*>(0x40);

struct MrReg {
void* collComm;
void* addr;
size_t size;
int type;
uint64_t mrFlags;
int fd; // -1 for a plain registration
void* mhandle;
};

struct Op {
char kind; // 'p' iput, 's' iputSignal, 'g' iget, 'f' iflush
void* rmaCtx;
int context;
uint64_t srcOff;
void* srcHandle;
size_t size;
uint64_t dstOff;
void* dstHandle;
uint32_t rank;
uint64_t signalOff;
void* signalHandle;
uint64_t signalValue;
uint32_t signalOp;
bool isStrong;
uint32_t optFlags;
void* request;
};

int maxRecvs = 1;
int ptrSupport = NCCL_PTR_HOST | NCCL_PTR_CUDA;
bool flushesAll = false;
bool pluginHasError = false;
bool flushReturnsNullRequest = false;
ncclResult_t listenResult = ncclSuccess, connectResult = ncclSuccess, getPropertiesResult = ncclSuccess,
closeListenResult = ncclSuccess, closeCollResult = ncclSuccess, createContextResult = ncclSuccess,
destroyContextResult = ncclSuccess, getRmaPropertiesResult = ncclSuccess, regMrSymResult = ncclSuccess,
deregMrSymResult = ncclSuccess, opResult = ncclSuccess, testResult = ncclSuccess,
queryLastErrorResult = ncclSuccess;
std::deque<ncclResult_t> regMrSymDmaBufResults; // empty means success

int listenDev = -1;
void* listenHandle = nullptr;
void* connectListenComm = nullptr;
int connectNranks = -1, connectRank = -1;
int getPropertiesDev = -1;
std::vector<void*> closedListens, closedColls, destroyedContexts, progressed, queried, tested;
ncclRmaConfig_t createConfig{};
std::vector<MrReg> regs;
std::vector<std::pair<void*, void*>> deregs;
std::vector<Op> ops;
std::set<void*> done;

ncclRma_t vtable{};

static FakeRmaVtable*& currentPtr() {
static FakeRmaVtable* p = nullptr;
return p;
}
static FakeRmaVtable& current() { return *currentPtr(); }
static void setCurrent(FakeRmaVtable* p) { currentPtr() = p; }

static ncclResult_t Init(void**, uint64_t, ncclDebugLogger_t) { return ncclSuccess; }
static ncclResult_t Devices(int* ndev) {
*ndev = 1;
return ncclSuccess;
}
static ncclResult_t Finalize(void*) { return ncclSuccess; }
static ncclResult_t GetProperties(int dev, ncclNetProperties_t* props) {
FakeRmaVtable& f = current();
f.getPropertiesDev = dev;
std::memset(props, 0, sizeof(*props));
props->maxRecvs = f.maxRecvs;
props->ptrSupport = f.ptrSupport;
return f.getPropertiesResult;
}
// Entry points taking a collComm reject the proxy's wrapper: the plugin must get its own back.
static ncclResult_t GetRmaProperties(void* collComm, ncclRmaProperties_t* rmaProps) {
FakeRmaVtable& f = current();
if (collComm != kCollComm) return ncclInternalError;
rmaProps->flushesAllPutsOnAnySignal = f.flushesAll;
return f.getRmaPropertiesResult;
}
static ncclResult_t Listen(void*, int dev, void* handle, void** listenComm) {
FakeRmaVtable& f = current();
f.listenDev = dev;
f.listenHandle = handle;
if (f.listenResult != ncclSuccess) return f.listenResult;
*listenComm = kListenComm;
return ncclSuccess;
}
static ncclResult_t Connect(void*, void**, int nranks, int rank, void* listenComm, void** collComm) {
FakeRmaVtable& f = current();
f.connectNranks = nranks;
f.connectRank = rank;
f.connectListenComm = listenComm;
if (f.connectResult != ncclSuccess) return f.connectResult;
*collComm = kCollComm;
return ncclSuccess;
}
static ncclResult_t CreateContext(void* collComm, ncclRmaConfig_t* config, void** rmaCtx) {
FakeRmaVtable& f = current();
if (collComm != kCollComm) return ncclInternalError;
f.createConfig = *config;
if (f.createContextResult != ncclSuccess) return f.createContextResult;
*rmaCtx = kRmaCtx;
return ncclSuccess;
}
static ncclResult_t RegMrSym(void* collComm, void* data, size_t size, int type, uint64_t mrFlags, void** mhandle) {
FakeRmaVtable& f = current();
if (f.regMrSymResult != ncclSuccess) return f.regMrSymResult;
*mhandle = reinterpret_cast<void*>(0xA000 + f.regs.size());
f.regs.push_back({collComm, data, size, type, mrFlags, -1, *mhandle});
return ncclSuccess;
}
static ncclResult_t RegMrSymDmaBuf(void* collComm, void* data, size_t size, int type, uint64_t offset, int fd,
uint64_t mrFlags, void** mhandle) {
FakeRmaVtable& f = current();
ncclResult_t res = ncclSuccess;
if (!f.regMrSymDmaBufResults.empty()) {
res = f.regMrSymDmaBufResults.front();
f.regMrSymDmaBufResults.pop_front();
}
if (offset != 0 || fd < 0) return ncclInternalError;
if (res != ncclSuccess) return res;
*mhandle = reinterpret_cast<void*>(0xA000 + f.regs.size());
f.regs.push_back({collComm, data, size, type, mrFlags, fd, *mhandle});
return ncclSuccess;
}
static ncclResult_t DeregMrSym(void* collComm, void* mhandle) {
FakeRmaVtable& f = current();
f.deregs.push_back({collComm, mhandle});
return f.deregMrSymResult;
}
static ncclResult_t DestroyContext(void* rmaCtx) {
FakeRmaVtable& f = current();
f.destroyedContexts.push_back(rmaCtx);
return f.destroyContextResult;
}
static ncclResult_t CloseColl(void* collComm) {
FakeRmaVtable& f = current();
f.closedColls.push_back(collComm);
return f.closeCollResult;
}
static ncclResult_t CloseListen(void* listenComm) {
FakeRmaVtable& f = current();
f.closedListens.push_back(listenComm);
return f.closeListenResult;
}
static ncclResult_t Submit(Op op, void** request) {
FakeRmaVtable& f = current();
op.request = reinterpret_cast<void*>(0x5000 + f.ops.size());
if (op.kind == 'f' && f.flushReturnsNullRequest) op.request = nullptr;
f.ops.push_back(op);
if (f.opResult != ncclSuccess) return f.opResult;
*request = op.request;
return ncclSuccess;
}
static ncclResult_t Iput(void* rmaCtx, int context, uint64_t srcOff, void* srcMhandle, size_t size, uint64_t dstOff,
void* dstMhandle, uint32_t rank, uint32_t optFlags, void** request) {
return Submit({'p', rmaCtx, context, srcOff, srcMhandle, size, dstOff, dstMhandle, rank, 0, nullptr, 0, 0, false,
optFlags, nullptr},
request);
}
static ncclResult_t IputSignal(void* rmaCtx, int context, uint64_t srcOff, void* srcMhandle, size_t size,
uint64_t dstOff, void* dstMhandle, uint32_t rank, uint64_t signalOff,
void* signalMhandle, uint64_t signalValue, uint32_t signalOp, bool isStrongSignal,
uint32_t optFlags, void** request) {
return Submit({'s', rmaCtx, context, srcOff, srcMhandle, size, dstOff, dstMhandle, rank, signalOff, signalMhandle,
signalValue, signalOp, isStrongSignal, optFlags, nullptr},
request);
}
static ncclResult_t Iget(void* rmaCtx, int context, uint64_t remoteOff, void* remoteMhandle, size_t size,
uint64_t localOff, void* localMhandle, uint32_t rank, uint32_t optFlags, void** request) {
return Submit({'g', rmaCtx, context, remoteOff, remoteMhandle, size, localOff, localMhandle, rank, 0, nullptr, 0,
0, false, optFlags, nullptr},
request);
}
static ncclResult_t Iflush(void* rmaCtx, int context, void* mhandle, uint32_t rank, void** request) {
return Submit({'f', rmaCtx, context, 0, nullptr, 0, 0, mhandle, rank, 0, nullptr, 0, 0, false, 0, nullptr},
request);
}
static ncclResult_t Test(void* collComm, void* request, int* done) {
FakeRmaVtable& f = current();
f.tested.push_back(request);
if (collComm != kCollComm) return ncclInternalError;
if (f.testResult != ncclSuccess) return f.testResult;
*done = f.done.count(request) ? 1 : 0;
return ncclSuccess;
}
static ncclResult_t RmaProgress(void* rmaCtx) {
current().progressed.push_back(rmaCtx);
return ncclSuccess;
}
static ncclResult_t QueryLastError(void* rmaCtx, bool* hasError) {
FakeRmaVtable& f = current();
f.queried.push_back(rmaCtx);
*hasError = f.pluginHasError;
return f.queryLastErrorResult;
}

FakeRmaVtable() {
vtable.name = "FakeRmaVtable";
vtable.init = &Init;
vtable.devices = &Devices;
vtable.getRmaProperties = &GetRmaProperties;
vtable.getProperties = &GetProperties;
vtable.listen = &Listen;
vtable.connect = &Connect;
vtable.createContext = &CreateContext;
vtable.regMrSym = &RegMrSym;
vtable.regMrSymDmaBuf = &RegMrSymDmaBuf;
vtable.deregMrSym = &DeregMrSym;
vtable.destroyContext = &DestroyContext;
vtable.closeColl = &CloseColl;
vtable.closeListen = &CloseListen;
vtable.iput = &Iput;
vtable.iputSignal = &IputSignal;
vtable.iget = &Iget;
vtable.iflush = &Iflush;
vtable.test = &Test;
vtable.rmaProgress = &RmaProgress;
vtable.queryLastError = &QueryLastError;
vtable.finalize = &Finalize;
}
};

#endif // RCCL_TEST_HOST_RMA_VTABLE_FAKE_H_
Loading
Loading