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

using FunctionSpecId = std::string#

Opaque string identifier for a function specification (domain + op-type + optional overload).

using FunctionImplId = std::string#

Opaque string identifier for a concrete function implementation (domain + op-type + optional overload), used as a lookup key in function registries.

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 function and delegates to the primary overload.

Parameters:

functionFunctionProto whose domain, name, and overload fields 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 FunctionImplId of the function called by node, using the node’s domain, op-type, and overload fields.

Parameters:

nodeNodeProto whose domain, op_type, and overload fields identify the called function.

Returns:

A string of the form "domain::op_type" or "domain::op_type::overload".