Files
rapidocr/tools/bench_cpu.sh
Cursor AgentandDaniel 3622c4598e feat: add C ABI, Python package, and CPU ISA paths
Expose the PP-OCRv6 engine through a stable C ABI and installable
shared and static libraries, plus a ctypes Python package that follows
the RapidOCR call shape. Keep AVX-512 out of the AVX2 object file and
speed up GEMM accumulate and the AArch64 GEMM tile.

Co-authored-by: Daniel <znsoft@163.com>
2026-10-04 23:40:06 +00:00

17 lines
631 B
Bash
Executable File

#!/bin/sh
# Time each legal runtime path. Extra arguments are forwarded to ppocr_isa_bench
# (DET REC DICT IMAGE RUNS) when an end-to-end OCR number is wanted.
set -eu
bench=$1
shift
echo "===== default (best legal ISA) ====="
"$bench" "$@"
echo "===== PPOCR_FORCE_ISA=avx2 ====="
PPOCR_FORCE_ISA=avx2 "$bench" "$@"
echo "===== PPOCR_FORCE_ISA=avx2 PPOCR_DISABLE_AVX2_GEMM_ACC2=1 ====="
PPOCR_FORCE_ISA=avx2 PPOCR_DISABLE_AVX2_GEMM_ACC2=1 "$bench" "$@"
echo "===== PPOCR_FORCE_ISA=scalar ====="
PPOCR_FORCE_ISA=scalar "$bench" "$@"
echo "===== PPOCR_DISABLE_AVX512_GEMM_ACC2=1 ====="
PPOCR_DISABLE_AVX512_GEMM_ACC2=1 "$bench" "$@"