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

Provides a registry for neural network operations in the Mila framework. More...

#include <string>
#include <format>
#include <memory>
#include <optional>
#include <unordered_map>
#include <functional>
#include <stdexcept>
#include <type_traits>
#include <typeindex>
#include <vector>
import Compute.CudaMemoryResource;
import Dnn.TensorTraits;
import Compute.MemoryResource;
import Dnn.ComponentConfig;
import Compute.Precision;
import Compute.OperationType;
import Compute.CpuMemoryResource;
import Compute.OperationBase;
import Compute.DeviceType;
import Compute.UnaryOperation;
import Compute.CpuDevice;
import Compute.BinaryOperation;
import Compute.DeviceContext;
import Compute.CudaDevice;

Classes

struct  Mila::Dnn::Compute::FusedOpMeta
 Metadata for fused operations in the neural network. More...
 
class  Mila::Dnn::Compute::OperationRegistry
 A registry for operations that can be created based on operation names, type information, and device type. More...
 
struct  Mila::Dnn::Compute::OperationRegistry::TypeID
 Type ID structure to uniquely identify operations based on input types and device type. More...
 
struct  Mila::Dnn::Compute::OperationRegistry::TypeIDHash
 Hash function for TypeID to use in unordered_map. More...
 

Namespaces

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

Detailed Description

Provides a registry for neural network operations in the Mila framework.

This file implements a comprehensive registry system that manages neural network operations across different device types (CPU, CUDA) and with various data types. It enables:

  • Registration of operation implementations for specific device types and data types
  • Creation of operations based on type information and device contexts
  • Support for operation variants with automatic fallback to default implementations
  • Registration and discovery of fused operations for performance optimization

The OperationRegistry serves as the central hub for operation management in the compute framework, allowing the system to dynamically select the appropriate implementation based on the current context and requirements.