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

Defines the operation types supported by the compute framework. More...

#include <string>
#include <stdexcept>

Namespaces

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

Enumerations

enum class  Mila::Dnn::Compute::OperationType {
  Mila::Dnn::Compute::CrossEntropyOp , Mila::Dnn::Compute::TokenEmbeddingOp , Mila::Dnn::Compute::LpeOp , Mila::Dnn::Compute::RopeOp ,
  Mila::Dnn::Compute::FusedOp , Mila::Dnn::Compute::LinearOp , Mila::Dnn::Compute::GeluOp , Mila::Dnn::Compute::SwigluOp ,
  Mila::Dnn::Compute::LayerNormOp , Mila::Dnn::Compute::RmsNormOp , Mila::Dnn::Compute::MultiHeadAttentionOp , Mila::Dnn::Compute::GroupedQueryAttentionOp ,
  Mila::Dnn::Compute::ResidualOp , Mila::Dnn::Compute::SoftmaxOp , Mila::Dnn::Compute::DropoutOp , Mila::Dnn::Compute::SamplingOp ,
  Mila::Dnn::Compute::SoftmaxCrossEntropyOp
}
 Enumeration of all supported neural network operation types. More...

Functions

std::string_view Mila::Dnn::Compute::operationTypeToString (OperationType op)

Variables

constexpr std::string_view Mila::Dnn::Compute::OperationNames::CrossEntropy = "CrossEntropyOp"
constexpr std::string_view Mila::Dnn::Compute::OperationNames::Dropout = "DropoutOp"
constexpr std::string_view Mila::Dnn::Compute::OperationNames::Fused = "FusedOp"
constexpr std::string_view Mila::Dnn::Compute::OperationNames::Gelu = "GeluOp"
constexpr std::string_view Mila::Dnn::Compute::OperationNames::GroupedQueryAttention = "GroupedQueryAttentionOp"
constexpr std::string_view Mila::Dnn::Compute::OperationNames::LayerNorm = "LayerNormOp"
constexpr std::string_view Mila::Dnn::Compute::OperationNames::Linear = "LinearOp"
constexpr std::string_view Mila::Dnn::Compute::OperationNames::Lpe = "LpeOp"
constexpr std::string_view Mila::Dnn::Compute::OperationNames::MultiHeadAttention = "MultiHeadAttentionOp"
constexpr std::string_view Mila::Dnn::Compute::OperationNames::Residual = "ResidualOp"
constexpr std::string_view Mila::Dnn::Compute::OperationNames::RmsNorm = "RmsNormOp"
constexpr std::string_view Mila::Dnn::Compute::OperationNames::Rope = "RopeOp"
constexpr std::string_view Mila::Dnn::Compute::OperationNames::Sampling = "SamplingOp"
constexpr std::string_view Mila::Dnn::Compute::OperationNames::Softmax = "SoftmaxOp"
constexpr std::string_view Mila::Dnn::Compute::OperationNames::SoftmaxCrossEntropy = "SoftmaxCrossEntropyOp"
 WIP — targeted for Llama training.
constexpr std::string_view Mila::Dnn::Compute::OperationNames::Swiglu = "SwigluOp"
constexpr std::string_view Mila::Dnn::Compute::OperationNames::TokenEmbedding = "TokenEmbeddingOp"

Detailed Description

Defines the operation types supported by the compute framework.

ARCHITECTURAL NOTE (TODO): OperationType is an internal dispatch key used by the compute layer. It is not part of the public Mila API — ComponentType (Dnn.ComponentType) is the user-facing component identity. OperationType should be moved to Dnn::Core and removed from the public Mila.ixx re-exports so it is inaccessible to library consumers. Operations are an implementation detail of Components; users should never need to reference OperationType directly.