Skip to content

Commit bb837b0

Browse files
committed
bug fix
Signed-off-by: chensuyue <suyue.chen@intel.com>
1 parent aa83c85 commit bb837b0

File tree

9 files changed

+20
-27
lines changed

9 files changed

+20
-27
lines changed

.github/workflows/pr-link-scan.yml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -110,31 +110,24 @@ jobs:
110110
echo "No.2----->refer_path is $refer_path, png_path is $png_path"
111111
112112
if [[ "${png_path:0:1}" == "/" ]]; then
113+
# absolute path
113114
check_path=$(echo "${png_path:1}" | cut -d '#' -f1)
114115
echo "No.3----->check_path is $check_path"
115-
elif [[ "$png_path" == *#* ]]; then
116-
relative_path=$(echo "$png_path" | cut -d '#' -f1)
117-
echo "No.4----->relative_path is $relative_path"
118-
if [ -n "$relative_path" ]; then
119-
check_path=$(dirname "$refer_path")/$relative_path
120-
png_path=$(echo "$png_path" | awk -F'#' '{print "#" $2}')
121-
echo "No.5----->check_path is $check_path, png_path is $png_path"
122-
else
123-
check_path=$refer_path
124-
echo "No.6----->check_path is $check_path"
125-
fi
126116
else
127-
check_path=$(dirname "$refer_path")/$png_path
128-
echo "No.7----->check_path is $check_path"
117+
# relative path
118+
check_path=${refer_path}
119+
relative_path=$(echo "$png_path" | cut -d '#' -f1)
120+
if [ -n "$relative_path" ]; then check_path=$(dirname "$refer_path")/$relative_path fi
121+
echo "No.4----->check_path is $check_path"
129122
fi
130123
131124
if [ -e "$check_path" ]; then
132125
real_path=$(realpath $check_path)
133-
echo "No.8 -----> Found relative path: $png_line from ${{github.workspace}}/$refer_path"
134-
if [[ "$png_line" == *#* ]]; then
126+
echo "No.5----->real_path is $real_path"
127+
if [[ "$png_path" == *#* ]]; then
135128
if [ -n "changed_files" ] && echo "$changed_files" | grep -q "^${refer_path}$"; then
136-
url_dev=$branch$(echo "$real_path" | sed 's|.*/neural-compressor||')$png_path
137-
echo "No.9----->url_dev is $url_dev"
129+
url_dev=$branch$(echo "$real_path" | sed 's|.*/neural-compressor||')$(echo "$png_path" | cut -d '#' -f2)
130+
echo "No.5----->url_dev is $url_dev"
138131
sleep $delay
139132
response=$(curl -I -L -s -o /dev/null -w "%{http_code}" "$url_dev")
140133
if [ "$response" -ne 200 ]; then

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ repos:
134134
exclude: |
135135
(?x)^(
136136
examples/.*(txt|patch)|
137-
examples/onnxrt/nlp/huggingface_model/text_generation/llama/quantization/ptq_static/prompt.json|
137+
examples/deprecated/onnxrt/nlp/huggingface_model/text_generation/llama/quantization/ptq_static/prompt.json|
138138
neural_compressor/torch/algorithms/fp8_quant/internal/diffusion_evaluation/SR_evaluation/imagenet1000_clsidx_to_labels.txt|
139139
neural_compressor/evaluation/hf_eval/datasets/cnn_validation.json|
140140
neural_compressor/torch/algorithms/fp8_quant/.+|

docs/source/3x/PT_MixedPrecision.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The 4th Gen Intel® Xeon® Scalable processor supports FP16 instruction set arch
1818
Further details can be found in the [Intel AVX512 FP16 Guide](https://www.intel.com/content/www/us/en/content-details/669773/intel-avx-512-fp16-instruction-set-for-intel-xeon-processor-based-products-technology-guide.html) published by Intel.
1919

2020
The latest Intel Xeon processors deliver flexibility of Intel Advanced Matrix Extensions (Intel AMX) ,an accelerator that improves the performance of deep learning(DL) training and inference, making it ideal for workloads like NLP, recommender systems, and image recognition. Developers can code AI functionality to take advantage of the Intel AMX instruction set, and they can code non-AI functionality to use the processor instruction set architecture (ISA). Intel has integrated the Intel® oneAPI Deep Neural Network Library (oneDNN), its oneAPI DL engine, into Pytorch.
21-
Further details can be found in the [Intel AMX Document](https://www.intel.com/content/www/us/en/content-details/785250/accelerate-artificial-intelligence-ai-workloads-with-intel-advanced-matrix-extensions-intel-amx.html) published by Intel.
21+
Further details can be found in the [Intel AMX Document](https://www.intel.com/content/www/us/en/content-details/785250/accelerate-artificial-intelligence-workloads-with-intel-advanced-matrix-extensions.html) published by Intel.
2222

2323
<p align="center" width="100%">
2424
<img src="./imgs/data_format.png" alt="Architecture" height=230>

docs/source/dataloader.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,6 @@ q_model = quantization.fit(model, config, calib_dataloader=dataloader, eval_func
9393

9494
## Examples
9595

96-
- Refer to this [example](https://github.com/intel/neural-compressor/blob/master/examples/onnxrt/body_analysis/onnx_model_zoo/ultraface/quantization/ptq_static) for how to define a customised dataloader.
96+
- Refer to this [example](https://github.com/intel/neural-compressor/blob/master/examples/deprecated/onnxrt/body_analysis/onnx_model_zoo/ultraface/quantization/ptq_static) for how to define a customised dataloader.
9797

98-
- Refer to this [example](https://github.com/intel/neural-compressor/blob/master/examples/onnxrt/nlp/bert/quantization/ptq_static) for how to use internal dataloader.
98+
- Refer to this [example](https://github.com/intel/neural-compressor/blob/master/examples/deprecated/onnxrt/nlp/bert/quantization/ptq_static) for how to use internal dataloader.

docs/source/metric.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,6 @@ q_model = fit(model, config, calib_dataloader=calib_dataloader, eval_dataloader=
124124

125125
## Example
126126

127-
- Refer to this [example](https://github.com/intel/neural-compressor/tree/master/examples/onnxrt/body_analysis/onnx_model_zoo/arcface/quantization/ptq_static) for how to define a customised metric.
127+
- Refer to this [example](https://github.com/intel/neural-compressor/tree/master/examples/deprecated/onnxrt/body_analysis/onnx_model_zoo/arcface/quantization/ptq_static) for how to define a customised metric.
128128

129-
- Refer to this [example](https://github.com/intel/neural-compressor/blob/master/examples/tensorflow/image_recognition/tensorflow_models/efficientnet-b0/quantization/ptq) for how to use internal metric.
129+
- Refer to this [example](https://github.com/intel/neural-compressor/tree/master/examples/deprecated/tensorflow/image_recognition/tensorflow_models/efficientnet-b0/quantization/ptq) for how to use internal metric.

docs/source/pruning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Pruning patterns defines the rules of pruned weights' arrangements in space. Int
107107

108108
- Multi-head Attention Pruning
109109

110-
Multi-head attention mechanism boosts transformer models' capability of contextual information analysis. However, different heads' contribution to the final output varies. In most situation, a number of heads can be removed without causing accuracy drop. Head pruning can be applied in a wide range of scenes including BERT, GPT as well as other large language models. **We haven't support it in pruning, but we have provided experimental feature in Model Auto Slim**. Please refer to [multi-head attention auto slim examples](https://github.com/intel/neural-compressor/blob/master/examples/pytorch/nlp/huggingface_models/question-answering/model_slim)
110+
Multi-head attention mechanism boosts transformer models' capability of contextual information analysis. However, different heads' contribution to the final output varies. In most situation, a number of heads can be removed without causing accuracy drop. Head pruning can be applied in a wide range of scenes including BERT, GPT as well as other large language models. **We haven't support it in pruning, but we have provided experimental feature in Model Auto Slim**. Please refer to [multi-head attention auto slim examples](https://github.com/intel/neural-compressor/blob/master/deprecated/examples/pytorch/nlp/huggingface_models/question-answering/model_slim)
111111

112112

113113

docs/source/smooth_quant.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ recipes = {"smooth_quant": True,
446446
conf = PostTrainingQuantConfig(recipes=recipes)
447447
```
448448

449-
To get more information, please refer to [examples](https://github.com/intel/neural-compressor/blob/master/examples/pytorch/nlp/huggingface_models/language-modeling/quantization/llm).
449+
To get more information, please refer to [examples](https://github.com/intel/neural-compressor/blob/master/examples/deprecated/pytorch/nlp/huggingface_models/language-modeling/quantization/llm).
450450

451451

452452
## Supported Framework Matrix

examples/deprecated/onnxrt/nlp/huggingface_model/text_classification/mix_precision/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ git clone -b dnnl_ep --depth 1 https://github.com/intel/neural-compressor.git
1111
cd neural-compressor
1212
pip install -e ./
1313

14-
cd examples/onnxrt/nlp/huggingface_model/text_classification/mix_precision/
14+
cd examples/deprecated/onnxrt/nlp/huggingface_model/text_classification/mix_precision/
1515
pip install -r requirements.txt
1616
```
1717

neural_compressor/compression/pruner/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Pruning patterns defines the rules of pruned weights' arrangements in space. Int
107107

108108
- Multi-head Attention Pruning
109109

110-
Multi-head attention mechanism boosts transformer models' capability of contextual information analysis. However, different heads' contribution to the final output varies. In most situation, a number of heads can be removed without causing accuracy drop. Head pruning can be applied in a wide range of scenes including BERT, GPT as well as other large language models. **We haven't support it in pruning, but we have provided experimental feature in Model Auto Slim**. Please refer to [multi-head attention auto slim examples](https://github.com/intel/neural-compressor/blob/master/examples/pytorch/nlp/huggingface_models/question-answering/model_slim)
110+
Multi-head attention mechanism boosts transformer models' capability of contextual information analysis. However, different heads' contribution to the final output varies. In most situation, a number of heads can be removed without causing accuracy drop. Head pruning can be applied in a wide range of scenes including BERT, GPT as well as other large language models. **We haven't support it in pruning, but we have provided experimental feature in Model Auto Slim**. Please refer to [multi-head attention auto slim examples](https://github.com/intel/neural-compressor/blob/master/examples/deprecated/pytorch/nlp/huggingface_models/question-answering/model_slim)
111111

112112

113113

0 commit comments

Comments
 (0)