MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / GetPeerAccessMap

Method GetPeerAccessMap

tensorflow/stream_executor/platform.cc:123–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123std::unique_ptr<Platform::PeerAccessMap> Platform::GetPeerAccessMap() {
124 auto *map = new PeerAccessMap;
125
126 int device_count = VisibleDeviceCount();
127 for (int i = 0; i < device_count; ++i) {
128 for (int j = 0; j < device_count; ++j) {
129 StreamExecutor *from = ExecutorForDevice(i).ValueOrDie();
130 StreamExecutor *to = ExecutorForDevice(j).ValueOrDie();
131 (*map)[{i, j}] = from->CanEnablePeerAccessTo(to);
132 }
133 }
134
135 return std::unique_ptr<Platform::PeerAccessMap>{map};
136}
137
138port::Status Platform::EnablePeerAccess() {
139 auto peer_access_map = GetPeerAccessMap();

Callers

nothing calls this directly

Calls 2

VisibleDeviceCountFunction · 0.85
CanEnablePeerAccessToMethod · 0.45

Tested by

no test coverage detected