docling icon indicating copy to clipboard operation
docling copied to clipboard

Seems like EasyOCR is not using GPU

Open nikhildigde opened this issue 11 months ago • 8 comments

Question

I am running docling on Ubuntu with Nvidia GPUs. However, its still taking a very long time (dosnt finish actually) parsing a 300 page pdf with images. Is there anything specific to check / debug this?

I have enabled gpu explicitly in the pipeline options for easyOcr.

Would be great if someone can help here. Thank you!

nikhildigde avatar Feb 18 '25 13:02 nikhildigde

@nikhildigde What is you configuration? How long is taking? Even with GPUs some documents of 300 pages can take up to 5 mins to be parsed, but that is still 8-10 times faster than using CPU.

pbonito avatar Feb 19 '25 19:02 pbonito

Running on A100 (6 GPU)

Docling version docling 2.15.1 docling-core 2.15.1 docling-ibm-models 3.2.1 docling-parse 3.1.1 ...

Python version Python 3.11.11

nikhildigde avatar Feb 20 '25 14:02 nikhildigde

How long it takes to parse a 300 pages pdf?

pbonito avatar Feb 20 '25 15:02 pbonito

kinda forever ... waited 30 mins almost. with ocr off - 130 sec. with tessaract - 230 sec (CPU)

nikhildigde avatar Feb 20 '25 15:02 nikhildigde

observed similar time on CPU, but on GPU parsing with OCR and TableFormerMode.ACCURATE takes less than 5 mins. You should verify that docking is using GPUs: Accelerator device: 'cuda:0'

pbonito avatar Feb 20 '25 16:02 pbonito

Should I set it explicitly? I thought it does it automatically

nikhildigde avatar Feb 20 '25 16:02 nikhildigde

@nikhildigde You are running a very old version of docling (2.15.1). I would recommend to upgrade to a newer version and try again. I am relatively sure we have solved this issue in the newer versions.

PeterStaar-IBM avatar Feb 21 '25 06:02 PeterStaar-IBM

@nikhildigde Please let us know is the latest version of docling works with GPU.

PeterStaar-IBM avatar Feb 25 '25 07:02 PeterStaar-IBM

@nikhildigde I will close this for now, I am fairly sure that the latest versions support GPU now.

PeterStaar-IBM avatar Mar 02 '25 15:03 PeterStaar-IBM

Hey @PeterStaar-IBM , apologies , I dint test it yet. I will do that in the next couple of days and update here. Thank you.

nikhildigde avatar Mar 02 '25 17:03 nikhildigde