constants.h#

namespace onnx_light

Alias that makes onnx-light headers compatible with code that references ONNX_LIGHT_NAMESPACE (the macro used in the standard onnx package).

Set to ONNX_LIGHT_NAMESPACE so both names resolve to the same namespace.

Symbol-visibility attribute for the public onnx-light C++ API.

Defined as empty because onnx-light does not require explicit __declspec(dllexport) or __attribute__((visibility("default"))) annotations — visibility is controlled at the shared-library level. The macro is provided so that vendored ONNX headers that decorate their declarations with ONNX_API compile without modification.

Namespace alias so that ONNX C++ code (and consumers such as onnxruntime) that refers to the literal onnx namespace — rather than the ONNX_NAMESPACE macro — resolves to the onnx-light namespace. The standard onnx package lives in namespace onnx; onnx-light uses onnx_light (via ONNX_LIGHT_NAMESPACE), so this alias keeps onnx-light a true drop-in. It is only introduced when the onnx-light namespace differs from onnx.

Functions

inline std::string NormalizeDomain(const std::string &domain)#

Returns the canonical ONNX domain for the provided domain value.

inline bool IsOnnxDomain(const std::string &domain)#

Indicates whether a domain is the canonical ONNX domain or its legacy alias.

inline bool IsOnnxDomain(const utils::String &domain)#

Variables

constexpr const char *AI_ONNX_ML_DOMAIN = "ai.onnx.ml"#

Domain for ONNX-ML operators.

constexpr const char *AI_ONNX_TRAINING_DOMAIN = "ai.onnx.training"#

Domain for ONNX Training operators.

constexpr const char *AI_ONNX_PREVIEW_DOMAIN = "ai.onnx.preview"#

Domain for preview ONNX operators.

constexpr const char *AI_ONNX_PREVIEW_TRAINING_DOMAIN = "ai.onnx.preview.training"#

Domain for preview ONNX Training operators.

constexpr const char *ONNX_DOMAIN = ""#

Canonical empty-string ONNX domain.

constexpr const char *AI_ONNX_DOMAIN = "ai.onnx"#

Legacy alias for the canonical ONNX domain.

constexpr bool OPTIONAL_VALUE = false#

Default optional-value flag used by schema helpers.

constexpr const char *DATA_BATCH = "DATA_BATCH"#

Symbolic batch axis label.

constexpr const char *DATA_CHANNEL = "DATA_CHANNEL"#

Symbolic channel axis label.

constexpr const char *DATA_TIME = "DATA_TIME"#

Symbolic time axis label.

constexpr const char *DATA_FEATURE = "DATA_FEATURE"#

Symbolic feature axis label.

constexpr const char *FILTER_IN_CHANNEL = "FILTER_IN_CHANNEL"#

Symbolic filter input-channel axis label.

constexpr const char *FILTER_OUT_CHANNEL = "FILTER_OUT_CHANNEL"#

Symbolic filter output-channel axis label.

constexpr const char *FILTER_SPATIAL = "FILTER_SPATIAL"#

Symbolic filter spatial axis label.

constexpr const char *TENSOR = "TENSOR"#

Type string for tensor values.

constexpr const char *IMAGE = "IMAGE"#

Type string for image values.

constexpr const char *AUDIO = "AUDIO"#

Type string for audio values.

constexpr const char *TEXT = "TEXT"#

Type string for text values.