tensorflow/stream_executor/gpu/redzone_allocator.cc
// Since we reuse the same buffer for multiple checks, we re-initialize redzone
// with a NaN pattern after a failed check.
//
// This function is blocking, since redzone failing is a rare event.
Since we reuse the same buffer for multiple checks, we re-initialize redzone
with a NaN pattern after a failed check.

This function is blocking, since redzone failing is a rare event.
Since we reuse the same buffer for multiple checks we re - initialize redzone with a NaN pattern after a failed check . This function is blocking since redzone failing is a rare event .
static port::Status ReinitializeRedzone(Stream* stream,
                                        DeviceMemoryBase redzone,
                                        uint8 redzone_pattern) {
  absl::FixedArray<uint8> redzone_array(redzone.size());
  redzone_array.fill(redzone_pattern);
  stream->ThenMemcpy(&redzone, redzone_array.data(), redzone.size());
  TF_RETURN_IF_ERROR(stream->BlockHostUntilDone());
  return port::Status::OK();
}
static port :: Status ReinitializeRedzone ( Stream * stream , DeviceMemoryBase redzone , uint8 redzone_pattern ) { absl :: FixedArray < uint8 > redzone_array ( redzone . size ( ) ) ; redzone_array . fill ( redzone_pattern ) ; stream -> ThenMemcpy ( & redzone , redzone_array . data ( ) , redzone . size ( ) ) ; TF_RETURN_IF_ERROR ( stream -> BlockHostUntilDone ( ) ) ; return port :: Status :: OK ( ) ; }
Since we reuse the same buffer for multiple checks, we re-initialize redzone
with a NaN pattern after a failed check.
Since we reuse the same buffer for multiple checks we re - initialize redzone with a NaN pattern after a failed check .