tensorflow/stream_executor/rocm/rocm_driver.cc
// Returns the current device set in HIP. This is done by calling the
// HIP driver (e.g., this value is not our cached view of the current device).
Returns the current device set in HIP. This is done by calling the
HIP driver .
Returns the current device set in HIP . This is done by calling the HIP driver .
static int CurrentDeviceOrDie() {
  int current = -1;
  hipError_t result = tensorflow::wrap::hipGetDevice(&current);
  if (result != hipSuccess) {
    LOG(FATAL) << "failed to query current device: " << ToString(result);
  }
  return current;
}
static int CurrentDeviceOrDie ( ) { int current = -1 ; hipError_t result = tensorflow :: wrap :: hipGetDevice ( & current ) ; if ( result != hipSuccess ) { LOG ( FATAL ) << " " << ToString ( result ) ; } return current ; }
Returns the current device set in HIP.
Returns the current device set in HIP .