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

Method EnablePeerAccess

tensorflow/stream_executor/platform.cc:138–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138port::Status Platform::EnablePeerAccess() {
139 auto peer_access_map = GetPeerAccessMap();
140 for (const auto &access : *peer_access_map) {
141 auto devices = access.first;
142 if (access.second) {
143 StreamExecutor *from = ExecutorForDevice(devices.first).ValueOrDie();
144 StreamExecutor *to = ExecutorForDevice(devices.second).ValueOrDie();
145 auto status = from->EnablePeerAccessTo(to);
146 if (!status.ok()) {
147 return status;
148 }
149 } else {
150 LOG(INFO) << "cannot enable peer access from device ordinal "
151 << devices.first << " to device ordinal " << devices.second;
152 }
153 }
154 return port::Status::OK();
155}
156
157} // namespace stream_executor

Callers

nothing calls this directly

Calls 3

GetPeerAccessMapFunction · 0.85
EnablePeerAccessToMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected