MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / optimize_for_inference

Method optimize_for_inference

src/gopt/impl/inference.cpp:101–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99/* ================ global functions ================ */
100
101SymbolVarArray gopt::optimize_for_inference(
102 const SymbolVarArray& dest_vars, const OptimizeForInferenceOptions& opt) {
103 return gopt::GraphOptimizer()
104 .add_preset_passes(
105 false, &opt, &dest_vars[0].node()->owner_graph()->options())
106 .apply({dest_vars})
107 .endpoint_vars();
108}
109
110SymbolVarArray gopt::layout_transform(
111 const SymbolVarArray& dest_vars, GraphTuningOptions::Target target) {

Callers 1

optimize_for_inferenceFunction · 0.45

Calls 4

GraphOptimizerClass · 0.50
applyMethod · 0.45
owner_graphMethod · 0.45
nodeMethod · 0.45

Tested by

no test coverage detected