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

Function DeviceIdentifier

tensorflow/compiler/xla/device_util.h:32–35  ·  view source on GitHub ↗

Returns a string that represents the device in terms of platform and ordinal; e.g. the first CUDA device will be "cuda:0"

Source from the content-addressed store, hash-verified

30// Returns a string that represents the device in terms of platform and ordinal;
31// e.g. the first CUDA device will be "cuda:0"
32string DeviceIdentifier(se::StreamExecutor* stream_exec) {
33 return absl::StrCat(stream_exec->platform()->Name(), ":",
34 stream_exec->device_ordinal());
35}
36
37} // namespace xla
38

Callers

nothing calls this directly

Calls 4

StrCatFunction · 0.50
NameMethod · 0.45
platformMethod · 0.45
device_ordinalMethod · 0.45

Tested by

no test coverage detected