From 56fa3880e318ddf805a64284260f959d77acc87a Mon Sep 17 00:00:00 2001 From: Wojciech Uss Date: Mon, 29 Jun 2020 11:00:10 +0200 Subject: [PATCH] rename qat into quant in filenames only (#25194) test=develop --- paddle/fluid/inference/tests/api/CMakeLists.txt | 2 +- ...=> analyzer_quant_image_classification_tester.cc} | 0 .../fluid/contrib/slim/quantization/__init__.py | 12 ++++++------ ...nt8_mkldnn_pass.py => quant2_int8_mkldnn_pass.py} | 0 ...int8_mkldnn_pass.py => quant_int8_mkldnn_pass.py} | 0 .../paddle/fluid/contrib/slim/tests/CMakeLists.txt | 10 +++++----- .../tests/{QAT_mkldnn_int8_readme.md => README.md} | 0 ...> quant2_int8_image_classification_comparison.py} | 0 ...p_comparison.py => quant2_int8_nlp_comparison.py} | 0 ...=> quant_int8_image_classification_comparison.py} | 0 .../tests/{save_qat_model.py => save_quant_model.py} | 0 ...kldnn_pass.py => test_quant2_int8_mkldnn_pass.py} | 0 12 files changed, 12 insertions(+), 12 deletions(-) rename paddle/fluid/inference/tests/api/{analyzer_qat_image_classification_tester.cc => analyzer_quant_image_classification_tester.cc} (100%) rename python/paddle/fluid/contrib/slim/quantization/{qat2_int8_mkldnn_pass.py => quant2_int8_mkldnn_pass.py} (100%) rename python/paddle/fluid/contrib/slim/quantization/{qat_int8_mkldnn_pass.py => quant_int8_mkldnn_pass.py} (100%) rename python/paddle/fluid/contrib/slim/tests/{QAT_mkldnn_int8_readme.md => README.md} (100%) rename python/paddle/fluid/contrib/slim/tests/{qat2_int8_image_classification_comparison.py => quant2_int8_image_classification_comparison.py} (100%) rename python/paddle/fluid/contrib/slim/tests/{qat2_int8_nlp_comparison.py => quant2_int8_nlp_comparison.py} (100%) rename python/paddle/fluid/contrib/slim/tests/{qat_int8_image_classification_comparison.py => quant_int8_image_classification_comparison.py} (100%) rename python/paddle/fluid/contrib/slim/tests/{save_qat_model.py => save_quant_model.py} (100%) rename python/paddle/fluid/contrib/slim/tests/{test_qat2_int8_mkldnn_pass.py => test_quant2_int8_mkldnn_pass.py} (100%) diff --git a/paddle/fluid/inference/tests/api/CMakeLists.txt b/paddle/fluid/inference/tests/api/CMakeLists.txt index b2f42d39e88..7d167fbdc8c 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 ce409b0dbfc..328983c70ec 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 64133da70f4..6a6d1500f33 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 -- GitLab