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

Method GetDevice

tensorflow/stream_executor/rocm/rocm_driver.cc:323–333  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

321}
322
323/* static */ port::Status GpuDriver::GetDevice(int device_ordinal,
324 hipDevice_t* device) {
325 hipError_t res = tensorflow::wrap::hipDeviceGet(device, device_ordinal);
326 if (res == hipSuccess) {
327 return port::Status::OK();
328 }
329
330 return port::Status{
331 port::error::INTERNAL,
332 absl::StrCat("failed call to hipDeviceGet: ", ToString(res))};
333}
334
335/* static */ bool GpuDriver::GetDeviceName(hipDevice_t device,
336 string* device_name) {

Callers

nothing calls this directly

Calls 2

ToStringFunction · 0.70
StrCatFunction · 0.50

Tested by

no test coverage detected