Skip to content

VIT_OCR performance drop (ERNIE drops also) #48636

Open
@pmajchrzak

Description

@pmajchrzak

Commit df82fd3 causes performance drop of VIT_OCR model. Especially wisible for bf16 numeric mode.

results:

fp32

image

bf16

image

CMAKE parameters:

-DCMAKE_BUILD_TYPE=Release -DWITH_GPU=OFF -DWITH_MKLDNN=ON -DWITH_TESTING=ON -DWITH_PROFILER=OFF -DWITH_STYLE_CHECK=OFF -DON_INFER=ON -DWITH_INFERENCE_API_TEST=ON -DPY_VERSION=3.6

VIT_OCR instalation and run:

VIT-OCR build:

vit-ocr.tar.gz

cd ${VIT_OCR_DIR}
mkdir -p build
cd build
cmake \
  .. \
  -DPADDLE_LIB=${PADDLE_DIR}/build/paddle_inference_install_dir \
  -DWITH_MKL=ON \
  -DDEMO_NAME=trt_test \
  -DWITH_STATIC_LIB=OFF
make -j ${CORES_NUM}

Run command:

FP32

./trt_test --model_file /data/PaddlePaddle/models/vit-ocr/model/inference.pdmodel --params_file /data/PaddlePaddle/models/vit-ocr/model/inference.pdiparams

BF16

./trt_test --model_file /data/PaddlePaddle/models/vit-ocr/model/inference.pdmodel --params_file /data/PaddlePaddle/models/vit-ocr/model/inference.pdiparams --bfloat16

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions