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

Device-agnostic data loader interface using abstract tensor data types. More...

#include <type_traits>
#include <cstddef>
#include <memory>
#include <stdexcept>
#include <cstdint>
#include <string>
#include <sstream>
import Dnn.TensorDataTypeTraits;
import Compute.CpuMemoryResource;
import Compute.MemoryResource;
import Compute.DeviceType;
import Dnn.TensorDataType;
import Dnn.Tensor;

Classes

class  Mila::Data::DataLoader< TInputDataType, TTargetDataType, TMemoryResource >
 Device-agnostic data loader interface using abstract tensor data types. More...

Namespaces

namespace  Mila
 Mila main API namespace.
namespace  Mila::Data

Typedefs

template<TensorDataType TInputDataType = TensorDataType::FP32, TensorDataType TTargetDataType = TInputDataType>
using Mila::Data::CpuDataLoader = DataLoader<TInputDataType, TTargetDataType, CpuMemoryResource>
 CPU data loader with single precision floating point.

Detailed Description

Device-agnostic data loader interface using abstract tensor data types.

This module provides a sophisticated data loading framework for efficiently feeding heterogeneous data into neural network models during training and evaluation processes. Uses abstract TensorDataType enumeration to enable seamless operation across different compute devices (CPU, CUDA, Metal, Rocm ) without exposing device-specific concrete types to host compilation.

Key architectural features:

  • Abstract data type system prevents device-specific compilation dependencies
  • Support for mixed-precision training with different input/target data types
  • Optimized memory resource selection for efficient host-device data transfers
  • Type-safe batch operations with compile-time validation
  • Extensible design for various data sources and formats