diff --git a/paddle/fluid/inference/tests/api/CMakeLists.txt b/paddle/fluid/inference/tests/api/CMakeLists.txt index b2f42d39e885fe93352e323627bbd532ddfe773d..7d167fbdc8c00755556d9d6d7c47fe0fb1184c3c 100644 --- a/paddle/fluid/inference/tests/api/CMakeLists.txt +++ b/paddle/fluid/inference/tests/api/CMakeLists.txt @@ -319,7 +319,7 @@ if(WITH_MKLDNN) set(QAT_DATA_DIR "${INFERENCE_DEMO_INSTALL_DIR}/qat") set(QAT_IMG_CLASS_TEST_APP "test_analyzer_qat_image_classification") - set(QAT_IMG_CLASS_TEST_APP_SRC "analyzer_qat_image_classification_tester.cc") + set(QAT_IMG_CLASS_TEST_APP_SRC "analyzer_quant_image_classification_tester.cc") # build test binary to be used in subsequent tests inference_analysis_api_test_build(${QAT_IMG_CLASS_TEST_APP} ${QAT_IMG_CLASS_TEST_APP_SRC}) diff --git a/paddle/fluid/inference/tests/api/analyzer_qat_image_classification_tester.cc b/paddle/fluid/inference/tests/api/analyzer_quant_image_classification_tester.cc similarity index 100% rename from paddle/fluid/inference/tests/api/analyzer_qat_image_classification_tester.cc rename to paddle/fluid/inference/tests/api/analyzer_quant_image_classification_tester.cc diff --git a/python/paddle/fluid/contrib/slim/quantization/__init__.py b/python/paddle/fluid/contrib/slim/quantization/__init__.py index ce409b0dbfc6b83b8074f198880d85518a633fc6..328983c70ecbe3b41ea21feb9f5be8d9e8a5a7ce 100644 --- a/python/paddle/fluid/contrib/slim/quantization/__init__.py +++ b/python/paddle/fluid/contrib/slim/quantization/__init__.py @@ -20,15 +20,15 @@ from . import quantization_strategy from .quantization_strategy import * from . import mkldnn_post_training_strategy from .mkldnn_post_training_strategy import * -from . import qat_int8_mkldnn_pass -from .qat_int8_mkldnn_pass import * -from . import qat2_int8_mkldnn_pass -from .qat2_int8_mkldnn_pass import * +from . import quant_int8_mkldnn_pass +from .quant_int8_mkldnn_pass import * +from . import quant2_int8_mkldnn_pass +from .quant2_int8_mkldnn_pass import * from . import post_training_quantization from .post_training_quantization import * __all__ = quantization_pass.__all__ + quantization_strategy.__all__ __all__ += mkldnn_post_training_strategy.__all__ -__all__ += qat_int8_mkldnn_pass.__all__ -__all__ += qat2_int8_mkldnn_pass.__all__ +__all__ += quant_int8_mkldnn_pass.__all__ +__all__ += quant2_int8_mkldnn_pass.__all__ __all__ += post_training_quantization.__all__ diff --git a/python/paddle/fluid/contrib/slim/quantization/qat2_int8_mkldnn_pass.py b/python/paddle/fluid/contrib/slim/quantization/quant2_int8_mkldnn_pass.py similarity index 100% rename from python/paddle/fluid/contrib/slim/quantization/qat2_int8_mkldnn_pass.py rename to python/paddle/fluid/contrib/slim/quantization/quant2_int8_mkldnn_pass.py diff --git a/python/paddle/fluid/contrib/slim/quantization/qat_int8_mkldnn_pass.py b/python/paddle/fluid/contrib/slim/quantization/quant_int8_mkldnn_pass.py similarity index 100% rename from python/paddle/fluid/contrib/slim/quantization/qat_int8_mkldnn_pass.py rename to python/paddle/fluid/contrib/slim/quantization/quant_int8_mkldnn_pass.py diff --git a/python/paddle/fluid/contrib/slim/tests/CMakeLists.txt b/python/paddle/fluid/contrib/slim/tests/CMakeLists.txt index 64133da70f4050c08d771b39ad9eefdd1fe1a4fb..6a6d1500f33ba6dbf360110710bdd0de03ca07ef 100644 --- a/python/paddle/fluid/contrib/slim/tests/CMakeLists.txt +++ b/python/paddle/fluid/contrib/slim/tests/CMakeLists.txt @@ -44,7 +44,7 @@ function(download_qat_fp32_model install_dir data_file) endfunction() function(inference_qat_int8_image_classification_test target qat_model_dir dataset_path) - py_test(${target} SRCS "${CMAKE_CURRENT_SOURCE_DIR}/qat_int8_image_classification_comparison.py" + py_test(${target} SRCS "${CMAKE_CURRENT_SOURCE_DIR}/quant_int8_image_classification_comparison.py" ENVS FLAGS_OMP_NUM_THREADS=${CPU_NUM_THREADS_ON_CI} OMP_NUM_THREADS=${CPU_NUM_THREADS_ON_CI} FLAGS_use_mkldnn=true @@ -58,7 +58,7 @@ endfunction() # set batch_size 10 for UT only (avoid OOM). For whole dataset, use batch_size 25 function(inference_qat2_int8_image_classification_test target qat_model_dir fp32_model_dir dataset_path ops_to_quantize) - py_test(${target} SRCS "${CMAKE_CURRENT_SOURCE_DIR}/qat2_int8_image_classification_comparison.py" + py_test(${target} SRCS "${CMAKE_CURRENT_SOURCE_DIR}/quant2_int8_image_classification_comparison.py" ENVS FLAGS_OMP_NUM_THREADS=${CPU_NUM_THREADS_ON_CI} OMP_NUM_THREADS=${CPU_NUM_THREADS_ON_CI} FLAGS_use_mkldnn=true @@ -73,7 +73,7 @@ endfunction() # set batch_size 10 for UT only (avoid OOM). For whole dataset, use batch_size 20 function(inference_qat2_int8_nlp_test target qat_model_dir fp32_model_dir dataset_path labels_path) - py_test(${target} SRCS "${CMAKE_CURRENT_SOURCE_DIR}/qat2_int8_nlp_comparison.py" + py_test(${target} SRCS "${CMAKE_CURRENT_SOURCE_DIR}/quant2_int8_nlp_comparison.py" ENVS FLAGS_OMP_NUM_THREADS=${CPU_NUM_THREADS_ON_CI} OMP_NUM_THREADS=${CPU_NUM_THREADS_ON_CI} FLAGS_use_mkldnn=true @@ -99,7 +99,7 @@ function(download_qat_model install_dir data_file) endfunction() function(save_qat_ic_model_test target qat_model_dir fp32_model_save_path int8_model_save_path ops_to_quantize) - py_test(${target} SRCS ${CMAKE_CURRENT_SOURCE_DIR}/save_qat_model.py + py_test(${target} SRCS ${CMAKE_CURRENT_SOURCE_DIR}/save_quant_model.py ARGS --qat_model_path ${qat_model_dir} --fp32_model_save_path ${fp32_model_save_path} --int8_model_save_path ${int8_model_save_path} @@ -107,7 +107,7 @@ function(save_qat_ic_model_test target qat_model_dir fp32_model_save_path int8_m endfunction() function(save_qat_nlp_model_test target qat_model_dir fp32_model_save_path int8_model_save_path) - py_test(${target} SRCS ${CMAKE_CURRENT_SOURCE_DIR}/save_qat_model.py + py_test(${target} SRCS ${CMAKE_CURRENT_SOURCE_DIR}/save_quant_model.py ARGS --qat_model_path ${qat_model_dir} --fp32_model_save_path ${fp32_model_save_path} --int8_model_save_path ${int8_model_save_path}) diff --git a/python/paddle/fluid/contrib/slim/tests/QAT_mkldnn_int8_readme.md b/python/paddle/fluid/contrib/slim/tests/README.md similarity index 100% rename from python/paddle/fluid/contrib/slim/tests/QAT_mkldnn_int8_readme.md rename to python/paddle/fluid/contrib/slim/tests/README.md diff --git a/python/paddle/fluid/contrib/slim/tests/qat2_int8_image_classification_comparison.py b/python/paddle/fluid/contrib/slim/tests/quant2_int8_image_classification_comparison.py similarity index 100% rename from python/paddle/fluid/contrib/slim/tests/qat2_int8_image_classification_comparison.py rename to python/paddle/fluid/contrib/slim/tests/quant2_int8_image_classification_comparison.py diff --git a/python/paddle/fluid/contrib/slim/tests/qat2_int8_nlp_comparison.py b/python/paddle/fluid/contrib/slim/tests/quant2_int8_nlp_comparison.py similarity index 100% rename from python/paddle/fluid/contrib/slim/tests/qat2_int8_nlp_comparison.py rename to python/paddle/fluid/contrib/slim/tests/quant2_int8_nlp_comparison.py diff --git a/python/paddle/fluid/contrib/slim/tests/qat_int8_image_classification_comparison.py b/python/paddle/fluid/contrib/slim/tests/quant_int8_image_classification_comparison.py similarity index 100% rename from python/paddle/fluid/contrib/slim/tests/qat_int8_image_classification_comparison.py rename to python/paddle/fluid/contrib/slim/tests/quant_int8_image_classification_comparison.py diff --git a/python/paddle/fluid/contrib/slim/tests/save_qat_model.py b/python/paddle/fluid/contrib/slim/tests/save_quant_model.py similarity index 100% rename from python/paddle/fluid/contrib/slim/tests/save_qat_model.py rename to python/paddle/fluid/contrib/slim/tests/save_quant_model.py diff --git a/python/paddle/fluid/contrib/slim/tests/test_qat2_int8_mkldnn_pass.py b/python/paddle/fluid/contrib/slim/tests/test_quant2_int8_mkldnn_pass.py similarity index 100% rename from python/paddle/fluid/contrib/slim/tests/test_qat2_int8_mkldnn_pass.py rename to python/paddle/fluid/contrib/slim/tests/test_quant2_int8_mkldnn_pass.py