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

Helpers to standardize registration of unary/binary/paired ops. More...

#include <memory>
#include <string>
#include <type_traits>
#include <stdexcept>
import Compute.UnaryOperation;
import Compute.BinaryOperation;
import Compute.ExecutionContext;
import Compute.DeviceType;
import Compute.OperationRegistry;
import Dnn.TensorDataType;
import Compute.PairedOperation;
import Compute.IExecutionContext;
import Dnn.ComponentConfig;

Classes

struct  Mila::Dnn::Compute::always_false< T >

Namespaces

namespace  Mila
 Mila main API namespace.
namespace  Mila::Dnn
namespace  Mila::Dnn::Compute

Functions

template<typename OpType, DeviceType DT, typename ConfigT>
std::shared_ptr< OpType > Mila::Dnn::Compute::makeOpInstance (IExecutionContext *ctx, const ConfigT &cfg)
 Attempt to construct an OpType instance from a raw IExecutionContext*.
template<DeviceType TDataType, typename OpType, Dnn::TensorDataType TA, Dnn::TensorDataType TB, Dnn::TensorDataType TP = TA>
void Mila::Dnn::Compute::registerBinaryOpType (const std::string &opName)
 Register a binary operation type with OperationRegistry using a common factory pattern.
template<DeviceType TDataType, typename OpType, Dnn::TensorDataType TA, Dnn::TensorDataType TB = TA, Dnn::TensorDataType TP = TA>
void Mila::Dnn::Compute::registerPairedOpType (const std::string &opName)
 Register a paired operation type with OperationRegistry using a common factory pattern.
template<DeviceType TDataType, typename OpType, Dnn::TensorDataType TInput, Dnn::TensorDataType TPrecision = TInput>
void Mila::Dnn::Compute::registerUnaryOpType (std::string_view op_name)
 Register a unary operation type with OperationRegistry using a common factory pattern.

Detailed Description

Helpers to standardize registration of unary/binary/paired ops.

Small helpers that produce consistent factory lambdas for OperationRegistry.