Mila
Deep Neural Network Library
Loading...
Searching...
No Matches
Compute.DeviceAllocation Module Reference

Functions

std::size_t Mila::Dnn::Compute::allocationGranularity (DeviceId device) noexcept
 The allocation granularity of device, or zero when it has none or cannot be asked.
constexpr std::size_t Mila::Dnn::Compute::occupiedDeviceBytes (std::size_t bytes, std::size_t granularity) noexcept
 Bytes one allocation of bytes occupies on a device with the given granularity.
std::size_t Mila::Dnn::Compute::occupiedTensorBytes (const auto &tensor)
 Bytes one tensor's allocation occupies on its own device.
std::size_t Mila::Dnn::Compute::readFreeDeviceBytes (DeviceId device) noexcept
 The device's free memory, or zero when the device cannot say.

Variables

constexpr std::size_t Mila::Dnn::Compute::kCudaAllocationGranularityBytes = std::size_t{ 2 } * 1024 * 1024
 The allocation granularity assumed for a CUDA device, the other half of the rule above.
constexpr std::size_t Mila::Dnn::Compute::kPackedAllocationLimitBytes = std::size_t{ 1024 } * 1024
 Requests up to this size share blocks the driver packs; larger ones are rounded to the granularity.

Files

file  Mila/Src/Dnn/Compute/DeviceAllocation.ixx
 What one device allocation occupies once the driver has rounded it, and the device's free memory.