Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b9f38bc
INC New API TF oob, wide_deep_large_ds, 3dunet-mlperf examples
lvliang-intel Dec 3, 2022
e04cb19
fix pyspelling check
lvliang-intel Dec 3, 2022
1e3f3bb
Merge branch 'master' of https://github.com/intel/neural-compressor i…
lvliang-intel Dec 5, 2022
f1bc677
update readme and remove default setting
lvliang-intel Dec 5, 2022
c67b308
update code according to comments
lvliang-intel Dec 5, 2022
a26ef7d
Merge branch 'lvl/ILITV-2455' of https://github.com/intel/neural-comp…
lvliang-intel Dec 5, 2022
89a4040
Merge branch 'master' of https://github.com/intel/neural-compressor i…
lvliang-intel Dec 9, 2022
52ac84a
remove oldapi examples
lvliang-intel Dec 9, 2022
bb8402f
remove oldapi examples
lvliang-intel Dec 9, 2022
3c91f77
add oldapi example link
lvliang-intel Dec 9, 2022
524f8d8
support removed model test
chensuyue Dec 11, 2022
353d606
update tensorflow CI models with newAPI
chensuyue Dec 11, 2022
054a943
Merge branch 'master' of https://github.com/intel/neural-compressor i…
lvliang-intel Dec 12, 2022
d6d52e8
Merge branch 'lvl/ILITV-2455' of https://github.com/intel/neural-comp…
lvliang-intel Dec 12, 2022
1887fb3
refine for PR 244
lvliang-intel Dec 12, 2022
596ab0b
Update run_tensorflow_models_trigger.sh
chensuyue Dec 13, 2022
f8e8f5d
update wide_deep_large_ds params
lvliang-intel Dec 16, 2022
9b58c4c
Merge branch 'master' of https://github.com/intel/neural-compressor i…
lvliang-intel Dec 16, 2022
e55f1fa
Merge branch 'lvl/ILITV-2455' of https://github.com/intel/neural-comp…
lvliang-intel Dec 16, 2022
af34a5b
Update run_benchmark.sh
chensuyue Dec 17, 2022
ceafcaa
refine benchmark for 3dunet
lvliang-intel Dec 19, 2022
e0bdfa1
Merge branch 'lvl/ILITV-2455' of https://github.com/intel/neural-comp…
lvliang-intel Dec 19, 2022
f6e20f8
merge master
lvliang-intel Dec 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .azure-pipelines/model-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pr:
include:
- neural_compressor
- setup.py
- examples/tensorflow/oob_models/quantization/ptq
exclude:
- neural_compressor/ux

Expand Down
45 changes: 31 additions & 14 deletions .azure-pipelines/scripts/models/env_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ for i in "$@"; do
--new_benchmark=*)
new_benchmark=$(echo $i | sed "s/${PATTERN}//")
;;
--inc_new_api=*)
inc_new_api=$(echo $i | sed "s/${PATTERN}//")
;;
*)
echo "Parameter $i not recognized."
exit 1
Expand All @@ -61,7 +64,19 @@ fi
$BOLD_YELLOW && echo "====== install requirements ======" && $RESET
/bin/bash /neural-compressor/.azure-pipelines/scripts/install_nc.sh

cd ${WORK_SOURCE_DIR}/${model_src_dir}
cd ${WORK_SOURCE_DIR}
if [[ "${inc_new_api}" == "false" ]]; then
echo "copy old api examples to workspace..."
git clone -b old_api_examples https://github.com/intel/neural-compressor.git old-lpot-models
cd old-lpot-models
git branch
cd -
rm -rf ${model_src_dir}
mkdir -p ${model_src_dir}
cp -r old-lpot-models/examples/${framework}/${model_src_dir} ${WORK_SOURCE_DIR}/${model_src_dir}/../
fi

cd ${model_src_dir}
pip install ruamel_yaml
pip install psutil
pip install protobuf==3.20.1
Expand Down Expand Up @@ -113,16 +128,18 @@ else
$BOLD_RED && echo "Not found requirements.txt file." && $RESET
fi

$BOLD_YELLOW && echo "======== update yaml config ========" && $RESET
$BOLD_YELLOW && echo -e "\nPrint origin yaml..." && $RESET
cat ${yaml}
python ${SCRIPTS_PATH}/update_yaml_config.py \
--yaml=${yaml} \
--framework=${framework} \
--dataset_location=${dataset_location} \
--batch_size=${batch_size} \
--strategy=${strategy} \
--new_benchmark=${new_benchmark} \
--multi_instance='true'
$BOLD_YELLOW && echo -e "\nPrint updated yaml... " && $RESET
cat ${yaml}
if [[ "${inc_new_api}" == "false" ]]; then
$BOLD_YELLOW && echo "======== update yaml config ========" && $RESET
$BOLD_YELLOW && echo -e "\nPrint origin yaml..." && $RESET
cat ${yaml}
python ${SCRIPTS_PATH}/update_yaml_config.py \
--yaml=${yaml} \
--framework=${framework} \
--dataset_location=${dataset_location} \
--batch_size=${batch_size} \
--strategy=${strategy} \
--new_benchmark=${new_benchmark} \
--multi_instance='true'
$BOLD_YELLOW && echo -e "\nPrint updated yaml... " && $RESET
cat ${yaml}
fi
5 changes: 4 additions & 1 deletion .azure-pipelines/scripts/models/run_model_trigger_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ do
strategy=`echo $i | sed "s/${PATTERN}//"`;;
--new_benchmark=*)
new_benchmark=`echo $i | sed "s/${PATTERN}//"`;;
--inc_new_api=*)
inc_new_api=`echo $i | sed "s/${PATTERN}//"`;;
--tuning_cmd=*)
tuning_cmd=`echo $i | sed "s/${PATTERN}//"`;;
--benchmark_cmd=*)
Expand Down Expand Up @@ -62,7 +64,8 @@ if [ "${mode}" == "env_setup" ]; then
--dataset_location=${dataset_location} \
--batch_size=${batch_size} \
--strategy=${strategy} \
--new_benchmark=${new_benchmark}
--new_benchmark=${new_benchmark} \
--inc_new_api="${inc_new_api}"
elif [ "${mode}" == "tuning" ]; then
cd ${WORK_SOURCE_DIR}/${model_src_dir}
$BOLD_YELLOW && echo "workspace ${WORK_SOURCE_DIR}/${model_src_dir}" && $RESET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ done
FRAMEWORK="mxnet"
FRAMEWORK_VERSION="1.9.1"


inc_new_api=false
# ======== set up config for mxnet models ========
if [ "${model}" == "resnet50v1" ]; then
model_src_dir="image_recognition/cnn_models/quantization/ptq"
Expand Down
3 changes: 2 additions & 1 deletion .azure-pipelines/scripts/models/run_onnxrt_models_trigger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ done
FRAMEWORK="onnxrt"
FRAMEWORK_VERSION="1.13.1"


inc_new_api=false
# ======== set up config for onnxrt models ========
if [ "${model}" == "resnet50-v1-12" ]; then
model_src_dir="image_recognition/onnx_model_zoo/resnet50/quantization/ptq"
Expand Down Expand Up @@ -82,6 +82,7 @@ fi
--new_benchmark=${new_benchmark} \
--tuning_cmd="${tuning_cmd}" \
--benchmark_cmd="${benchmark_cmd}" \
--inc_new_api="${inc_new_api}" \
--mode=${mode} \
--USE_TUNE_ACC=${USE_TUNE_ACC} \
--PERF_STABLE_CHECK=${PERF_STABLE_CHECK} \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ FRAMEWORK="pytorch"
FRAMEWORK_VERSION="1.12.0+cpu"
TORCH_VISION_VERSION="0.13.0+cpu"


inc_new_api=false
# ======== set up config for pytorch models ========
if [ "${model}" == "resnet18" ]; then
model_src_dir="image_recognition/torchvision_models/quantization/ptq/cpu/eager"
Expand Down Expand Up @@ -64,6 +64,7 @@ fi
--new_benchmark=${new_benchmark} \
--tuning_cmd="${tuning_cmd}" \
--benchmark_cmd="${benchmark_cmd}" \
--inc_new_api="${inc_new_api}" \
--mode=${mode} \
--USE_TUNE_ACC=${USE_TUNE_ACC} \
--PERF_STABLE_CHECK=${PERF_STABLE_CHECK} \
Expand Down
17 changes: 11 additions & 6 deletions .azure-pipelines/scripts/models/run_tensorflow_models_trigger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ done
FRAMEWORK="tensorflow"
FRAMEWORK_VERSION="2.10.0"

inc_new_api=false
# ======== set up config for tensorflow models ========
if [ "${model}" == "resnet50v1.5" ]; then
model_src_dir="image_recognition/tensorflow_models/quantization/ptq"
Expand Down Expand Up @@ -83,8 +84,9 @@ elif [ "${model}" == "darknet19" ]; then
strategy="basic"
batch_size=1
new_benchmark=false
tuning_cmd="bash run_tuning.sh --topology=${model} --dataset_location= --input_model=${input_model}"
benchmark_cmd="bash run_benchmark.sh --topology=${model} --dataset_location= --mode=benchmark --batch_size=1 --iters=500"
inc_new_api=true
tuning_cmd="bash run_tuning.sh --topology=${model} --input_model=${input_model}"
benchmark_cmd="bash run_benchmark.sh --topology=${model} --mode=performance --batch_size=1 --iters=500"
elif [ "${model}" == "densenet-121" ]; then
model_src_dir="oob_models/quantization/ptq"
dataset_location=""
Expand All @@ -93,8 +95,9 @@ elif [ "${model}" == "densenet-121" ]; then
strategy="basic"
batch_size=1
new_benchmark=false
tuning_cmd="bash run_tuning.sh --topology=${model} --dataset_location= --input_model=${input_model}"
benchmark_cmd="bash run_benchmark.sh --topology=${model} --dataset_location= --mode=benchmark --batch_size=1 --iters=500"
inc_new_api=true
tuning_cmd="bash run_tuning.sh --topology=${model} --input_model=${input_model}"
benchmark_cmd="bash run_benchmark.sh --topology=${model} --mode=performance --batch_size=1 --iters=500"
elif [ "${model}" == "resnet-101" ]; then
model_src_dir="oob_models/quantization/ptq"
dataset_location=""
Expand All @@ -103,8 +106,9 @@ elif [ "${model}" == "resnet-101" ]; then
strategy="basic"
batch_size=1
new_benchmark=false
tuning_cmd="bash run_tuning.sh --topology=${model} --dataset_location= --input_model=${input_model}"
benchmark_cmd="bash run_benchmark.sh --topology=${model} --dataset_location= --mode=benchmark --batch_size=1 --iters=500"
inc_new_api=true
tuning_cmd="bash run_tuning.sh --topology=${model} --input_model=${input_model}"
benchmark_cmd="bash run_benchmark.sh --topology=${model} --mode=performance --batch_size=1 --iters=500"
elif [ "${model}" == "resnet50_fashion" ]; then
model_src_dir="image_recognition/keras_models/resnet50_fashion/quantization/ptq"
dataset_location="/tf_dataset2/datasets/mnist/FashionMNIST_small"
Expand All @@ -131,6 +135,7 @@ fi
--new_benchmark=${new_benchmark} \
--tuning_cmd="${tuning_cmd}" \
--benchmark_cmd="${benchmark_cmd}" \
--inc_new_api="${inc_new_api}" \
--mode=${mode} \
--USE_TUNE_ACC=${USE_TUNE_ACC} \
--PERF_STABLE_CHECK=${PERF_STABLE_CHECK} \
Expand Down
Loading