8 #include <unordered_map>
9 #include <unordered_set>
13 #include "core/framework/session_options.h"
18 #if !defined(ORT_MINIMAL_BUILD)
23 #if !defined(ORT_MINIMAL_BUILD) || defined(ORT_EXTENDED_MINIMAL_BUILD)
24 #include "core/optimizer/selectors_actions/selector_action_transformer_apply_contexts.h"
27 namespace onnxruntime {
28 class IExecutionProvider;
30 namespace optimizer_utils {
32 #if !defined(ORT_MINIMAL_BUILD)
54 const SessionOptions& session_options,
58 std::unordered_map<std::string, std::unique_ptr<Tensor>>* p_buffered_tensors =
nullptr);
60 #endif // !defined(ORT_MINIMAL_BUILD)
62 #if !defined(ORT_MINIMAL_BUILD) || defined(ORT_EXTENDED_MINIMAL_BUILD)
84 const SessionOptions& session_options,
85 const SatApplyContextVariant& apply_context,
89 std::unordered_map<std::string, std::unique_ptr<Tensor>>* p_buffered_tensors =
nullptr);
91 #endif // !defined(ORT_MINIMAL_BUILD) || defined(ORT_EXTENDED_MINIMAL_BUILD)
std::unique_ptr< RuleBasedGraphTransformer > GenerateRuleBasedGraphTransformer(TransformerLevel level, const InlinedHashSet< std::string > &rules_to_disable, const InlinedHashSet< std::string_view > &compatible_execution_providers)
absl::InlinedVector< T, N, Allocator > InlinedVector
std::string GenerateRuleBasedTransformerName(TransformerLevel level)
InlinedVector< std::unique_ptr< RewriteRule > > GenerateRewriteRules(TransformerLevel level, const InlinedHashSet< std::string > &rules_to_disable={})
InlinedVector< std::unique_ptr< GraphTransformer > > GenerateTransformersForMinimalBuild(TransformerLevel level, const SessionOptions &session_options, const SatApplyContextVariant &apply_context, const IExecutionProvider &cpu_execution_provider, const InlinedHashSet< std::string > &rules_and_transformers_to_disable={}, concurrency::ThreadPool *intra_op_thread_pool=nullptr, std::unordered_map< std::string, std::unique_ptr< Tensor >> *p_buffered_tensors=nullptr)
InlinedVector< std::unique_ptr< GraphTransformer > > GenerateTransformers(TransformerLevel level, const SessionOptions &session_options, const IExecutionProvider &execution_provider, const InlinedHashSet< std::string > &rules_and_transformers_to_disable={}, concurrency::ThreadPool *intra_op_thread_pool=nullptr, std::unordered_map< std::string, std::unique_ptr< Tensor >> *p_buffered_tensors=nullptr)