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

Function InternalInit

tensorflow/stream_executor/rocm/rocm_driver.cc:294–310  ·  view source on GitHub ↗

Actually performs the work of ROCM initialization. Wrapped up in one-time execution guard.

Source from the content-addressed store, hash-verified

292// Actually performs the work of ROCM initialization. Wrapped up in one-time
293// execution guard.
294static port::Status InternalInit() {
295 hipError_t res = hipErrorNoDevice;
296 if (FLAGS_gpuexec_rocm_driver_inject_init_error) {
297 LOG(ERROR) << "injecting ROCM init error; initialization will fail";
298 } else {
299 res = tensorflow::wrap::hipInit(0 /* = flags */);
300 }
301
302 if (res == hipSuccess) {
303 return port::Status::OK();
304 }
305
306 LOG(ERROR) << "failed call to hipInit: " << ToString(res);
307 Diagnostician::LogDiagnosticInformation();
308 return port::Status{port::error::ABORTED,
309 absl::StrCat("failed call to hipInit: ", ToString(res))};
310}
311
312} // namespace
313

Callers 1

InitMethod · 0.70

Calls 2

ToStringFunction · 0.70
StrCatFunction · 0.50

Tested by

no test coverage detected