| 72 | } |
| 73 | |
| 74 | port::StatusOr<StreamExecutor*> ROCmPlatform::FirstExecutorForBus( |
| 75 | int bus_ordinal) { |
| 76 | InspectNumaNodes(); |
| 77 | CHECK_LT(bus_ordinal, BusCount()) << "bus ordinal out of available range"; |
| 78 | for (int i = 0; i < VisibleDeviceCount(); i++) { |
| 79 | if (DeviceToBus(i) == bus_ordinal) { |
| 80 | StreamExecutorConfig config; |
| 81 | config.ordinal = i; |
| 82 | return GetExecutor(config).ValueOrDie(); |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | return port::Status{ |
| 87 | port::error::NOT_FOUND, |
| 88 | absl::StrFormat("Executor for bus %d not found.", bus_ordinal)}; |
| 89 | } |
| 90 | |
| 91 | Platform::Id ROCmPlatform::id() const { return rocm::kROCmPlatformId; } |
| 92 |
nothing calls this directly
no test coverage detected