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

Function WrapRedzoneBestEffort

tensorflow/core/kernels/gpu_utils.cc:39–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39se::DeviceMemoryBase WrapRedzoneBestEffort(
40 se::cuda::RedzoneAllocator* rz_allocator, se::DeviceMemoryBase buffer) {
41 if (RedzoneCheckDisabled()) {
42 return buffer;
43 }
44 se::DeviceMemoryBase output_tensor;
45 auto output_rz_or = rz_allocator->AllocateBytes(buffer.size());
46 if (!output_rz_or.ok()) {
47 static std::once_flag rz_allocation_failure_logged;
48 std::call_once(rz_allocation_failure_logged, []() {
49 LOG(WARNING) << "Failed to allocate memory for convolution redzone "
50 << "checking; skipping this check. This is benign and only "
51 << "means that we won't check cudnn for out-of-bounds reads "
52 << "and writes. This message will only be printed once.";
53 });
54 return buffer;
55 }
56 return se::DeviceMemoryBase(output_rz_or.ValueOrDie());
57}
58
59template<typename T>
60void CheckRedzones(const se::cuda::RedzoneAllocator& rz_allocator,

Callers 7

operator()Method · 0.85
ComputeMethod · 0.85
operator()Method · 0.85
launchMethod · 0.85
operator()Method · 0.85

Calls 5

RedzoneCheckDisabledFunction · 0.85
DeviceMemoryBaseClass · 0.50
AllocateBytesMethod · 0.45
sizeMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected