Add the fully tensorflow 2.7.0 supporting.
@@ -47,7 +47,6 @@ from .graph_rewriter.generic.fold_batch_norm import FoldBatchNormNodesOptimizer
from .graph_rewriter.generic.fuse_pad_with_conv import FusePadWithConv2DOptimizer
from .graph_rewriter.int8.freeze_value import FreezeValueTransformer
-from .graph_rewriter.int8.freeze_value_without_calib import FreezeValueWithoutCalibTransformer
from .graph_rewriter.int8.freeze_fake_quant import FreezeFakeQuantOpOptimizer
from .graph_rewriter.int8.fuse_conv_requantize import FuseConvRequantizeTransformer
from .graph_rewriter.int8.fuse_matmul_requantize import FuseMatMulRequantizeTransformer
@@ -62,7 +61,7 @@ from neural_compressor.adaptor.tf_utils.graph_rewriter.generic.insert_print_node
from neural_compressor.adaptor.tf_utils.graph_rewriter.graph_util import GraphRewriterHelper as Helper
-TF_SUPPORTED_MAX_VERSION = '2.6.2'
+TF_SUPPORTED_MAX_VERSION = '2.7.0'
TF_SUPPORTED_MIN_VERSION = '1.14.0'
logger = logging.getLogger()
@@ -177,7 +176,7 @@ class GraphConverter:
if IsMklEnabled() and (TF_SUPPORTED_MIN_VERSION <= tf.version.VERSION):
is_supported_version = True
- if tf.version.VERSION.find("2.6.") != -1 and os.getenv('TF_ENABLE_ONEDNN_OPTS') == '1':
+ if tf.version.VERSION >= '2.6.0' and os.getenv('TF_ENABLE_ONEDNN_OPTS') == '1':
is_supported_version = True
except Exception as e:
@@ -195,7 +194,7 @@ class GraphConverter:
logger.fatal("Please set environment variable TF_ENABLE_MKL_NATIVE_FORMAT=0 "
"when Tensorflow 2.5.0 installed.")
- if tf.version.VERSION.find('2.6.') != -1 and os.getenv('TF_ENABLE_ONEDNN_OPTS') != '1':
+ if tf.version.VERSION >= '2.6.0' and os.getenv('TF_ENABLE_ONEDNN_OPTS') != '1':
logger.fatal("Please set environment variable TF_ENABLE_ONEDNN_OPTS=1 "
"when Tensorflow 2.6.x installed.")
