shape_check.h#
Shared precondition helpers reused by every per-operator ComputeShape* shape-inference function.
-
namespace ONNX_LIGHT_NAMESPACE
-
namespace onnx_optim
-
namespace shapes
Functions
-
void CheckNodeOpAndOutput(const NodeProto &node, const char *expected_op_type, const char *caller)#
Validates the common preamble of every
ComputeShape*function:node.op_type()must equalexpected_op_type;nodemust declare at least one output.
The
callerargument is embedded verbatim in the exception messages so that callers can surface their own name (typically theComputeShape*function performing the check).- Throws:
std::invalid_argument – when
node.op_type()differs fromexpected_op_typeor whennode.output_size() < 1.
-
void CheckNodeOpAndOutput(const NodeProto &node, const char *expected_op_type, const char *caller)#
-
namespace shapes
-
namespace onnx_optim