Mila
Deep Neural Network Library
Loading...
Searching...
No Matches
TensorBuffer.ixx File Reference

Memory management layer for tensor data with support for CPU and GPU storage. More...

#include <cuda_runtime.h>
#include <memory>
#include <vector>
#include <limits>
#include <iostream>
#include <stdexcept>
#include <cstring>
#include <type_traits>
import Cuda.Error;
import Compute.CudaMemoryResource;
import Compute.CpuMemoryResource;
import Compute.MemoryResourceTracker;
import Compute.MemoryResource;

Classes

class  Mila::Dnn::TensorBuffer< T, MR, TrackMemory >
 A buffer for storing tensor data with configurable memory management. More...
 

Namespaces

namespace  Mila
 
namespace  Mila::Dnn
 
namespace  Mila::Dnn::detail
 

Functions

template<typename MR >
constexpr size_t Mila::Dnn::detail::get_alignment ()
 Determines the appropriate memory alignment based on the memory resource type.
 

Variables

constexpr size_t Mila::Dnn::detail::CPU_SIMD_ALIGN = 64
 AVX-512 alignment for CPU operations.
 
constexpr size_t Mila::Dnn::detail::CUDA_WARP_SIZE = 32
 CUDA warp size alignment (32 threads)
 

Detailed Description

Memory management layer for tensor data with support for CPU and GPU storage.