ONE - On-device Neural Engine
|
Class to fold Dequantize, which can be folded by constant inputs. More...
#include <FoldDequantizePass.h>
Public Member Functions | |
const char * | name (void) const final |
bool | run (loco::Graph *g) final |
Public Member Functions inherited from logo::Pass | |
virtual | ~Pass ()=default |
Class to fold Dequantize, which can be folded by constant inputs.
Definition at line 29 of file FoldDequantizePass.h.
|
inlinefinalvirtual |
Reimplemented from logo::Pass.
Definition at line 31 of file FoldDequantizePass.h.
|
finalvirtual |
Folding pattern 1 - When input of Dequantize is foldable constant
[Before] quantized_const_input -------— Dequantize -------— Op — +– Op1_with_quant_input — +– Op2_with_quant_input —
[After] dequantized_const_input -----------------------------— Op —
quantized_const_input --— Op1_with_quant_input — +– Op2_with_quant_input —
Folding pattern 2 - When input of Dequantize uses quantized output value
[Before] quantized_const_input --— Gather --— Dequantize — Op — +– Op1_with_quant_input — +– Op2_with_quant_input —
[After] dequantized_const_input ---—Gather -----------------— Op —
quantized_const_input --— Op1_with_quant_input — +– Op2_with_quant_input —
Implements logo::Pass.
Definition at line 213 of file FoldDequantizePass.cpp.
References loco::active_nodes(), loco::output_nodes(), loco::replace(), loco::succs(), and loco::Subst< SubstQualifier::Default >::with().
Referenced by package.infer.session::inference().