Commit 048e0952 authored by myhloli's avatar myhloli

docs(cuda-acceleration): add tips to verify CUDA acceleration effectiveness

Add notes in the Ubuntu and Windows CUDA acceleration guides on how to
determine if CUDA acceleration is working. This includes checking for
significant reductions in `layout detection cost`, `mfr time`, and `ocr cost`
as indicators of successful acceleration.
parent c0ee70d5
...@@ -97,6 +97,7 @@ magic-pdf pdf-command --pdf small_ocr.pdf ...@@ -97,6 +97,7 @@ magic-pdf pdf-command --pdf small_ocr.pdf
```bash ```bash
magic-pdf pdf-command --pdf small_ocr.pdf magic-pdf pdf-command --pdf small_ocr.pdf
``` ```
> 提示:CUDA加速是否生效可以根据log中输出的各个阶段cost耗时来简单判断,通常情况下,`layout detection cost` 和 `mfr time` 应提速10倍以上。
## 10. 为ocr开启cuda加速 ## 10. 为ocr开启cuda加速
> ❗️以下操作需显卡显存大于等于16G才可进行,否则会因为显存不足导致程序崩溃或运行速度下降 > ❗️以下操作需显卡显存大于等于16G才可进行,否则会因为显存不足导致程序崩溃或运行速度下降
...@@ -109,3 +110,4 @@ python -m pip install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org. ...@@ -109,3 +110,4 @@ python -m pip install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.
```bash ```bash
magic-pdf pdf-command --pdf small_ocr.pdf magic-pdf pdf-command --pdf small_ocr.pdf
``` ```
> 提示:CUDA加速是否生效可以根据log中输出的各个阶段cost耗时来简单判断,通常情况下,`ocr cost`应提速10倍以上。
...@@ -88,6 +88,7 @@ pip install --force-reinstall torch==2.3.1 torchvision==0.18.1 --index-url https ...@@ -88,6 +88,7 @@ pip install --force-reinstall torch==2.3.1 torchvision==0.18.1 --index-url https
```bash ```bash
magic-pdf pdf-command --pdf small_ocr.pdf magic-pdf pdf-command --pdf small_ocr.pdf
``` ```
> 提示:CUDA加速是否生效可以根据log中输出的各个阶段cost耗时来简单判断,通常情况下,`layout detection cost` 和 `mfr time` 应提速10倍以上。
## 9. 为ocr开启cuda加速 ## 9. 为ocr开启cuda加速
> ❗️以下操作需显卡显存大于等于16G才可进行,否则会因为显存不足导致程序崩溃或运行速度下降 > ❗️以下操作需显卡显存大于等于16G才可进行,否则会因为显存不足导致程序崩溃或运行速度下降
...@@ -100,4 +101,5 @@ pip install paddlepaddle-gpu==2.6.1 ...@@ -100,4 +101,5 @@ pip install paddlepaddle-gpu==2.6.1
```bash ```bash
magic-pdf pdf-command --pdf small_ocr.pdf magic-pdf pdf-command --pdf small_ocr.pdf
``` ```
> 提示:CUDA加速是否生效可以根据log中输出的各个阶段cost耗时来简单判断,通常情况下,`ocr cost`应提速10倍以上。
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment