| 45 | using RedzoneCheckStatus = RedzoneAllocator::RedzoneCheckStatus; |
| 46 | |
| 47 | RedzoneAllocator::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 | |
| 61 | port::StatusOr<DeviceMemory<uint8>> RedzoneAllocator::AllocateBytes( |
| 62 | int64 byte_size) { |
nothing calls this directly
no test coverage detected