math/utils.h#

Math-domain schema helpers, including onnx::defs::math::utils::TopKOpGenerator() and onnx::defs::math::utils::MatMulShapeInference().

Declares reusable math-operator schema and inference helpers.

This header defines utility APIs for math-domain operators, including TopK schema generation, scalar extraction from TensorProto constants, and MatMul shape inference helpers.

namespace ONNX_LIGHT_NAMESPACE
namespace defs#
namespace math#
namespace utils#

Functions

std::function<void(OpSchema&)> TopKOpGenerator(std::vector<std::string> allowed_types)#
template<typename T>
T GetScalarValueFromTensor(const ONNX_LIGHT_NAMESPACE::TensorProto *t)#
void MatMulShapeInference(ONNX_LIGHT_NAMESPACE::InferenceContext &ctx, int input1Idx, int input2Idx)#
void QLinearMatMulShapeInference(ONNX_LIGHT_NAMESPACE::InferenceContext &ctx)#
const char *QLinearMatMulDoc()#
int MathOpTwoIntegers(const std::string &op_type, int a, int b)#