File tree Expand file tree Collapse file tree 2 files changed +1
-415
lines changed
neural_compressor/tensorflow/quantization/utils/graph_rewriter/generic
test/3x/tensorflow/quantization/ptq/newapi Expand file tree Collapse file tree 2 files changed +1
-415
lines changed Original file line number Diff line number Diff line change 2222from neural_compressor .tensorflow .quantization .utils .graph_rewriter .graph_base import GraphRewriterBase
2323from neural_compressor .tensorflow .quantization .utils .graph_util import GraphAnalyzer
2424from neural_compressor .tensorflow .quantization .utils .graph_util import GraphRewriterHelper as Helper
25- from neural_compressor .tensorflow .utils import SPR_BASE_VERSIONS
2625
2726
2827class FuseGeluOptimizer (GraphRewriterBase ): # pragma: no cover
2928 """Fuse Sqrt + RealDiv + Erf + AddV2 + Mul + Mul into Gelu op."""
3029
3130 def do_transformation (self ):
3231 """Execute the fusion from small ops to Gelu."""
33- if not ( tf .version .VERSION in ("1.15.0-up2" , "1.15.0-up3" ) or tf . version . VERSION in SPR_BASE_VERSIONS ):
32+ if tf .version .VERSION not in ("1.15.0-up2" , "1.15.0-up3" ):
3433 return self .model
3534
3635 cur_graph = GraphAnalyzer ()
You can’t perform that action at this time.
0 commit comments