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

Method FirstExecutorForBus

tensorflow/stream_executor/cuda/cuda_platform.cc:114–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114port::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
131Platform::Id CudaPlatform::id() const { return cuda::kCudaPlatformId; }
132

Callers

nothing calls this directly

Calls 2

VisibleDeviceCountFunction · 0.85
StatusEnum · 0.50

Tested by

no test coverage detected