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

Method stream_executor

tensorflow/compiler/xla/service/backend.cc:168–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168StatusOr<se::StreamExecutor*> Backend::stream_executor(
169 int device_ordinal) const {
170 if (device_ordinal < 0 ||
171 device_ordinal > stream_executors_.back()->device_ordinal()) {
172 return InvalidArgument(
173 "Invalid device ordinal value (%d). Valid range is [0, %d].",
174 device_ordinal, stream_executors_.back()->device_ordinal());
175 }
176 for (auto* executor : stream_executors_) {
177 if (executor->device_ordinal() == device_ordinal) {
178 return executor;
179 }
180 }
181 return InvalidArgument("device %s not supported by XLA service",
182 device_name(device_ordinal));
183}
184
185StatusOr<bool> Backend::devices_equivalent(int device_ordinal_a,
186 int device_ordinal_b) {

Callers 7

TransferToInfeedLocalMethod · 0.80
GetCpuClientFunction · 0.80
GetNvidiaGpuClientFunction · 0.80
CompileExecutablesMethod · 0.80
ExecuteReplicatedMethod · 0.80

Calls 3

InvalidArgumentFunction · 0.85
device_ordinalMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected