HDK
|
InlinedVector<std::unique_ptr<RewriteRule> > onnxruntime::optimizer_utils::GenerateRewriteRules | ( | TransformerLevel | level, |
const InlinedHashSet< std::string > & | rules_to_disable = {} |
||
) |
Generates all predefined rules for this level. If rules_to_enable is not empty, it returns the intersection of predefined rules and rules_to_enable. TODO: This is visible for testing at the moment, but we should rather make it private.
std::unique_ptr<RuleBasedGraphTransformer> onnxruntime::optimizer_utils::GenerateRuleBasedGraphTransformer | ( | TransformerLevel | level, |
const InlinedHashSet< std::string > & | rules_to_disable, | ||
const InlinedHashSet< std::string_view > & | compatible_execution_providers | ||
) |
Generates all rule-based transformers for this level.
std::string onnxruntime::optimizer_utils::GenerateRuleBasedTransformerName | ( | TransformerLevel | level | ) |
Given a TransformerLevel, this method generates a name for the rule-based graph transformer of that level.
InlinedVector<std::unique_ptr<GraphTransformer> > onnxruntime::optimizer_utils::GenerateTransformers | ( | TransformerLevel | level, |
const SessionOptions & | session_options, | ||
const IExecutionProvider & | execution_provider, | ||
const InlinedHashSet< std::string > & | rules_and_transformers_to_disable = {} |
||
) |
Generates all predefined (both rule-based and non-rule-based) transformers for this level. Any transformers or rewrite rules named in rules_and_transformers_to_disable will be excluded.
InlinedVector<std::unique_ptr<GraphTransformer> > onnxruntime::optimizer_utils::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 = {} |
||
) |
Generates all predefined transformers which can be used to provide runtime optimizations for this level in a minimal build. Any transformers or rewrite rules named in rules_and_transformers_to_disable will be excluded.
This is a distinct function from GenerateTransformers() because: