reduction/utils.h#

Reduction-schema generator helpers, including onnx::ReduceOpGenerator(), onnx::ReduceOpDynamicAxes(), and onnx::ReduceFunctionOp().

Declares shared reduction-operator schema generator helpers.

This header defines empty-set identity descriptions and helper builders used to construct Reduce* operator schemas across opset variants.

namespace ONNX_LIGHT_NAMESPACE

Functions

std::function<void(OpSchema&)> ReduceOpGenerator(const char *name, const char *empty_value, bool supports_8bit_datatypes = false, bool axes_input = false, const char *func_body = nullptr, const ContextDependentFunctionBodyBuilder &function_builder = nullptr, bool supports_boolean_datatype = false)#
inline std::function<void(OpSchema&)> ReduceOpDynamicAxes(const char *name, const char *empty_value)#
inline std::function<void(OpSchema&)> ReduceFunctionOp(const char *name, const char *empty_value, const char *func_body)#

Variables

constexpr const char *EMPTY_ZERO = "0"#
constexpr const char *EMPTY_ONE = "1"#
constexpr const char *EMPTY_UNDEFINED = "undefined"#
constexpr const char *EMPTY_MIN = "minus infinity (if supported by the datatype) or the minimum value of the data type otherwise"#
constexpr const char *EMPTY_MAX = "plus infinity (if supported by the datatype) or the maximum value of the data type otherwise"#
constexpr const char *EMPTY_MINUS_INF = "minus infinity (if supported by the datatype) or undefined otherwise"#