| 136 | } |
| 137 | |
| 138 | port::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 |
nothing calls this directly
no test coverage detected