proto_util.h#
Utilities for building canonical string identifiers for ONNX functions and
callee nodes, including onnx::FunctionImplId,
onnx::GetFunctionImplId(), and onnx::GetCalleeId().
Utilities for building canonical string identifiers for ONNX functions and callee nodes.
-
namespace ONNX_LIGHT_NAMESPACE
Typedefs
Functions
-
inline FunctionImplId GetFunctionImplId(const std::string &domain, const std::string &op, const std::string &overload)#
Builds a canonical function-implementation identifier.
Concatenates the normalized domain, op name, and (when non-empty) overload into a “::” separated string. The resulting value can be used as a stable key in function-implementation maps.
- Parameters:
domain – ONNX operator domain (e.g.
""or"ai.onnx.ml").op – Operator type name.
overload – Optional overload qualifier; omitted from the key when empty.
- Returns:
A string of the form
"domain::op"or"domain::op::overload".
-
inline FunctionImplId GetFunctionImplId(const FunctionProto &function)#
Builds a canonical function-implementation identifier from a FunctionProto.
Convenience overload that extracts the domain, name, and overload fields from
functionand delegates to the primary overload.- Parameters:
function – FunctionProto whose
domain,name, andoverloadfields are used to construct the identifier.- Returns:
A string of the form
"domain::name"or"domain::name::overload".
-
inline FunctionImplId GetCalleeId(const NodeProto &node)#
Builds the callee identifier for a NodeProto.
Constructs the identifier that matches the
FunctionImplIdof the function called bynode, using the node’s domain, op-type, and overload fields.- Parameters:
node – NodeProto whose
domain,op_type, andoverloadfields identify the called function.- Returns:
A string of the form
"domain::op_type"or"domain::op_type::overload".
-
inline FunctionImplId GetFunctionImplId(const std::string &domain, const std::string &op, const std::string &overload)#