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

Method FirstExecutorForBus

tensorflow/stream_executor/rocm/rocm_platform.cc:74–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74port::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
91Platform::Id ROCmPlatform::id() const { return rocm::kROCmPlatformId; }
92

Callers

nothing calls this directly

Calls 1

VisibleDeviceCountFunction · 0.85

Tested by

no test coverage detected