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

Method RedzoneAllocator

tensorflow/stream_executor/cuda/redzone_allocator.cc:47–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45using RedzoneCheckStatus = RedzoneAllocator::RedzoneCheckStatus;
46
47RedzoneAllocator::RedzoneAllocator(
48 Stream* stream, DeviceMemoryAllocator* memory_allocator,
49 cuda::PtxCompilationOptions ptx_compilation_opts, int64 memory_limit,
50 int64 redzone_size, uint8 redzone_pattern)
51 : device_ordinal_(stream->parent()->device_ordinal()),
52 stream_(stream),
53 memory_limit_(memory_limit),
54 redzone_size_(RoundUpToNearest(
55 redzone_size,
56 static_cast<int64>(tensorflow::Allocator::kAllocatorAlignment))),
57 redzone_pattern_(redzone_pattern),
58 memory_allocator_(memory_allocator),
59 ptx_compilation_opts_(ptx_compilation_opts) {}
60
61port::StatusOr<DeviceMemory<uint8>> RedzoneAllocator::AllocateBytes(
62 int64 byte_size) {

Callers

nothing calls this directly

Calls 3

RoundUpToNearestFunction · 0.70
device_ordinalMethod · 0.45
parentMethod · 0.45

Tested by

no test coverage detected