tensorflow/stream_executor/rocm/rocm_driver.cc
// Returns a stringified representation of whether or not peer access is
// permitted between the "from" and "to" pointers' associated contexts,
// primarily for logging purposes. Returns "error" if an error is encountered
// in the process of querying.
Returns a stringified representation of whether or not peer access is
permitted between the "from" and "to" pointers' associated contexts,
primarily for logging purposes. Returns "error" if an error is encountered
in the process of querying.
Returns a stringified representation of whether or not peer access is permitted between the " from " and " to " pointers ' associated contexts primarily for logging purposes . Returns " error " if an error is encountered in the process of querying .
string ROCMPointersToCanAccessString(hipDeviceptr_t from, hipDeviceptr_t to) {
  hipPointerAttribute_t from_pointerAttributes;
  hipError_t result =
      tensorflow::wrap::hipPointerGetAttributes(&from_pointerAttributes, from);
  if (result != hipSuccess) {
    LOG(ERROR) << "could not retrieve source pointer's device: "
               << ToString(result);
    return "error";
  }
  hipPointerAttribute_t to_pointerAttributes;
  result = tensorflow::wrap::hipPointerGetAttributes(&to_pointerAttributes, to);
  if (result != hipSuccess) {
    LOG(ERROR) << "could not retrieve destination pointer's device: "
               << ToString(result);
    return "error";
  }
  GpuContext fromCtx(from_pointerAttributes.device);
  GpuContext toCtx(to_pointerAttributes.device);
  return GpuDriver::CanEnablePeerAccess(&fromCtx, &toCtx) ? "true" : "false";
}
string ROCMPointersToCanAccessString ( hipDeviceptr_t from , hipDeviceptr_t to ) { hipPointerAttribute_t from_pointerAttributes ; hipError_t result = tensorflow :: wrap :: hipPointerGetAttributes ( & from_pointerAttributes , from ) ; if ( result != hipSuccess ) { LOG ( ERROR ) << " " << ToString ( result ) ; return " " ; } hipPointerAttribute_t to_pointerAttributes ; result = tensorflow :: wrap :: hipPointerGetAttributes ( & to_pointerAttributes , to ) ; if ( result != hipSuccess ) { LOG ( ERROR ) << " " << ToString ( result ) ; return " " ; } GpuContext fromCtx ( from_pointerAttributes . device ) ; GpuContext toCtx ( to_pointerAttributes . device ) ; return GpuDriver :: CanEnablePeerAccess ( & fromCtx , & toCtx ) ? " " : " " ; }
Returns a stringified representation of whether or not peer access is
permitted between the "from" and "to" pointers' associated contexts,
primarily for logging purposes.
Returns a stringified representation of whether or not peer access is permitted between the " from " and " to " pointers ' associated contexts primarily for logging purposes .