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

Provides device registration and management for the Mila deep neural network framework. More...

#include <vector>
#include <map>
#include <mutex>
#include <functional>
#include <string>
#include <type_traits>
#include <stdexcept>
#include <memory>
import Compute.ComputeDevice;

Classes

class  Mila::Dnn::Compute::DeviceRegistry
 Registry for compute device creation and management. More...
 

Namespaces

namespace  Mila
 
namespace  Mila::Dnn
 
namespace  Mila::Dnn::Compute
 

Detailed Description

Provides device registration and management for the Mila deep neural network framework.

This file implements a singleton registry pattern for compute devices, allowing different device types (CPU, CUDA GPUs) to be registered, created, and managed throughout the application lifecycle. The registry functions as a central point for device discovery and instantiation.

The DeviceRegistry class enables:

  • Registration of different device types through factory functions
  • Device creation by name with consistent interfaces
  • Thread-safe access to device factories
  • Enumeration of available device types

This registry is a core infrastructure component that supports the dynamic device selection and management capabilities of the Mila framework.