diff --git a/onnxruntime/core/graph/graph_utils.cc b/onnxruntime/core/graph/graph_utils.cc index ef294e4887..b5f47a7b87 100644 --- a/onnxruntime/core/graph/graph_utils.cc +++ b/onnxruntime/core/graph/graph_utils.cc @@ -293,6 +293,13 @@ bool IsSupportedOptypeVersionAndDomain(const Node& node, MatchesOpSinceVersion(node, versions) && MatchesOpSetDomain(node, domain)); } +bool IsSupportedOptypeVersionAndDomain(const Node& node, + const char* op_type, + const std::initializer_list& versions, + const char* domain) { + return IsSupportedOptypeVersionAndDomain(node, std::string(op_type), versions, std::string(domain)); +} + bool MatchesOpSinceVersion(const Node& node, const std::initializer_list& versions) { return std::find(versions.begin(), versions.end(), node.SinceVersion()) != versions.end(); } diff --git a/onnxruntime/core/graph/graph_utils.h b/onnxruntime/core/graph/graph_utils.h index b23da03c7f..267b8a683b 100644 --- a/onnxruntime/core/graph/graph_utils.h +++ b/onnxruntime/core/graph/graph_utils.h @@ -15,6 +15,10 @@ bool IsSupportedOptypeVersionAndDomain(const Node& node, const std::string& op_type, const std::initializer_list& versions, const std::string& domain = kOnnxDomainAlias); +bool IsSupportedOptypeVersionAndDomain(const Node& node, + const char* op_type, + const std::initializer_list& versions, + const char* domain = kOnnxDomainAlias); /** Checks if the node has the same operator since version as the given one. */ bool MatchesOpSinceVersion(const Node& node, const std::initializer_list& versions);