mirror of
https://github.com/microsoft/mscclpp.git
synced 2026-05-11 17:00:22 +00:00
Create ib mr for per ib transport (#611)
This commit is contained in:
@@ -57,7 +57,7 @@ struct RegisteredMemory::Impl {
|
||||
std::vector<TransportInfo> transportInfos;
|
||||
|
||||
// Only used for IB transport
|
||||
std::unique_ptr<const IbMr> ibMr;
|
||||
std::unordered_map<Transport, std::unique_ptr<const IbMr>> ibMrMap;
|
||||
|
||||
// For sharing memory handle via file descriptor
|
||||
int fileDesc = -1;
|
||||
|
||||
@@ -88,10 +88,10 @@ RegisteredMemory::Impl::Impl(void* data, size_t size, TransportFlags transports,
|
||||
auto addIb = [&](Transport ibTransport) {
|
||||
TransportInfo transportInfo;
|
||||
transportInfo.transport = ibTransport;
|
||||
this->ibMr = contextImpl.getIbContext(ibTransport)->registerMr(data, size);
|
||||
transportInfo.ibMr = this->ibMr.get();
|
||||
this->ibMrMap[ibTransport] = contextImpl.getIbContext(ibTransport)->registerMr(data, size);
|
||||
transportInfo.ibMr = this->ibMrMap[ibTransport].get();
|
||||
transportInfo.ibLocal = true;
|
||||
transportInfo.ibMrInfo = this->ibMr->getInfo();
|
||||
transportInfo.ibMrInfo = this->ibMrMap[ibTransport]->getInfo();
|
||||
this->transportInfos.push_back(transportInfo);
|
||||
INFO(MSCCLPP_NET, "IB mr for address %p with size %ld is registered", data, size);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user