copy to switch chan

This commit is contained in:
Ubuntu
2026-02-20 18:14:33 +00:00
parent db34b946a8
commit aa1ad02a70

View File

@@ -95,6 +95,7 @@ void worker(int myRank, int gpuId, const std::string &ipPort) {
log("Rank ", myRank, " (GPU ", gpuId, "): synchronize ...");
auto deviceHandle = switchChannel.deviceHandle();
cudaMemcpyToSymbol(gConstSwitchChan, &deviceHandle, sizeof(deviceHandle));
cudaDeviceSynchronize();
log("Rank ", myRank, " (GPU ", gpuId, "): launch kernel ...");
@@ -109,6 +110,8 @@ void worker(int myRank, int gpuId, const std::string &ipPort) {
comm->bootstrap()->barrier();
log("Rank ", myRank, " (GPU ", gpuId, "): kernel launched ...");
//mscclpp::GpuBuffer buffer(bufferBytes);
//mscclpp::GpuBuffer pktBuffer(pktBufferBytes);
//mscclpp::RegisteredMemory localRegMem = comm.registerMemory(buffer.data(), buffer.bytes(), transport);