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

Enumeration of built-in component types supported by the deserializer. More...

#include <string>
#include <string_view>
#include <algorithm>
#include <cctype>

Namespaces

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

Enumerations

enum class  Mila::Dnn::ComponentType : int {
  Mila::Dnn::Unknown = 0 , Mila::Dnn::Linear , Mila::Dnn::Gelu , Mila::Dnn::Swiglu ,
  Mila::Dnn::LayerNorm , Mila::Dnn::RmsNorm , Mila::Dnn::Softmax , Mila::Dnn::Dropout ,
  Mila::Dnn::MultiHeadAttention , Mila::Dnn::GroupedQueryAttention , Mila::Dnn::Residual , Mila::Dnn::TokenEmbedding ,
  Mila::Dnn::Lpe , Mila::Dnn::Rope , Mila::Dnn::SoftmaxCrossEntropy , Mila::Dnn::Mlp ,
  Mila::Dnn::Transformer , Mila::Dnn::Network , Mila::Dnn::Gpt2 , Mila::Dnn::Llama ,
  Mila::Dnn::Mistral , Mila::Dnn::Bert , Mila::Dnn::CustomComponentStart = 1000 , Mila::Dnn::MockComponent = CustomComponentStart
}
 Canonical list of framework-known component types. More...

Functions

ComponentType Mila::Dnn::fromString (std::string_view s) noexcept
 Parse a case-insensitive component name into a ComponentType.
ComponentType Mila::Dnn::fromTypeId (std::string_view s) noexcept
 Map a short type identifier back to a ComponentType enum.
std::string Mila::Dnn::toString (ComponentType t) noexcept
 Convert a ComponentType enum value to its canonical name.
std::string Mila::Dnn::toTypeId (ComponentType t) noexcept
 Get the short 2..4 character type identifier for a ComponentType.

Detailed Description

Enumeration of built-in component types supported by the deserializer.

Provides an enum and helper conversion utilities used by serialization, factories and concise diagnostics.