File indexing completed on 2025-08-28 08:58:47
0001
0002
0003
0004
0005
0006
0007 #pragma once
0008
0009 #include <string>
0010
0011 #include "onnx/common/constants.h"
0012 #include "onnx/onnx_pb.h"
0013
0014 namespace ONNX_NAMESPACE {
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 using FunctionSpecId = std::string;
0025
0026
0027 using FunctionImplId = std::string;
0028
0029 FunctionImplId GetFunctionImplId(const std::string& domain, const std::string& op, const std::string& overload) {
0030 if (overload.empty())
0031 return NormalizeDomain(domain) + "::" + op;
0032 return NormalizeDomain(domain) + "::" + op + "::" + overload;
0033 }
0034
0035 FunctionImplId GetFunctionImplId(const FunctionProto& function) {
0036 return GetFunctionImplId(function.domain(), function.name(), function.overload());
0037 }
0038
0039 FunctionImplId GetCalleeId(const NodeProto& node) {
0040 return GetFunctionImplId(node.domain(), node.op_type(), node.overload());
0041 }
0042
0043 }