| 112 | } |
| 113 | |
| 114 | port::StatusOr<StreamExecutor*> CudaPlatform::FirstExecutorForBus( |
| 115 | int bus_ordinal) { |
| 116 | InspectNumaNodes(); |
| 117 | CHECK_LT(bus_ordinal, BusCount()) << "bus ordinal out of available range"; |
| 118 | for (int i = 0; i < VisibleDeviceCount(); i++) { |
| 119 | if (DeviceToBus(i) == bus_ordinal) { |
| 120 | StreamExecutorConfig config; |
| 121 | config.ordinal = i; |
| 122 | return GetExecutor(config).ValueOrDie(); |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | return port::Status( |
| 127 | port::error::NOT_FOUND, |
| 128 | absl::StrFormat("Executor for bus %d not found.", bus_ordinal)); |
| 129 | } |
| 130 | |
| 131 | Platform::Id CudaPlatform::id() const { return cuda::kCudaPlatformId; } |
| 132 |
nothing calls this directly
no test coverage detected