Skip to content
Merged
Changes from all commits
Commits
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
34 changes: 31 additions & 3 deletions src/header/TransferBench.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1429,8 +1429,6 @@ namespace {
}

prop.requestedHandleTypes = hipMemHandleTypeFabric;
// at this point shouldn't have any memtype other than device
// ERR_CHECK(GetMemLocation(memDevice, prop.location));
prop.location.type = hipMemLocationTypeDevice;
prop.location.id = memDevice.memIndex;
return ERR_NONE;
Expand Down Expand Up @@ -1529,7 +1527,6 @@ namespace {

// Specify memory access descriptor to enable local read/write
hipMemAccessDesc desc;
// ERR_CHECK(GetMemLocation(memDevice, desc.location));
desc.location.type = hipMemLocationTypeDevice;
desc.location.id = memDevice.memIndex;
desc.flags = hipMemAccessFlagsProtReadWrite;
Expand Down Expand Up @@ -2584,6 +2581,37 @@ namespace {
i, t.exeDevice.exeRank});
break;
}

// Pod (cross-rank) transfers with a GPU executor are exchanged via CUDA/HIP fabric handles,
// which, for current version, only support device backed allocations.
// Reject host memory allocations up front.
if (IsGpuExeType(t.exeDevice.exeType)) {
bool hasRemoteCpuMem = false;
MemDevice offender = {};
char const* role = nullptr;
for (auto const& src : t.srcs) {
if (src.memRank != t.exeDevice.exeRank && IsCpuMemType(src.memType)) {
hasRemoteCpuMem = true; offender = src; role = "SRC"; break;
}
}
if (!hasRemoteCpuMem) {
for (auto const& dst : t.dsts) {
if (dst.memRank != t.exeDevice.exeRank && IsCpuMemType(dst.memType)) {
hasRemoteCpuMem = true; offender = dst; role = "DST"; break;
}
}
}
if (hasRemoteCpuMem) {
errors.push_back({ERR_FATAL,
"Transfer %d: Cross-rank GPU executor (R%d%c%d) cannot access remote host memory "
"(%s on rank %d is %s). Fabric-handle sharing only supports GPU memory for 1.67; use a NIC "
"executor (e.g. R%dN..) for cross-rank transfers involving host memory.",
i, t.exeDevice.exeRank, ExeTypeStr[t.exeDevice.exeType], t.exeDevice.exeIndex,
role, offender.memRank, GetMemTypeName(offender.memType), t.exeDevice.exeRank});
Comment thread
AtlantaPepsi marked this conversation as resolved.
hasFatalError = true;
break;
}
}
}

// Check subexecutors
Expand Down
Loading