qurator-spk / eynollah

Document Layout Analysis
Apache License 2.0
332 stars 27 forks source link

No GPU acceleration #72

Closed hasnain095 closed 2 years ago

hasnain095 commented 2 years ago

When running eynollah on an GPU-enabled server there is no GPU acceleration. Below is when eynollah was run on a server without GPU (123.5 seconds) eynollah_cpu_only

And this is when eynollah was run on a GPU-enabled server (133.4 seconds) eynollah_with_gpu

Result of running nvidia-smi command gpu_usage

Please guide me, did I miss something during installation or do I need to change certain settings. Thank you.

cneud commented 2 years ago

Thank you for reporting, we will investigate further. There should be no specific settings required to utilize GPU imo other than CUDA being set up.

On a first quick glance, it seems you are running Eynollah with the -light switch, which does significantly speed up the process compared to not using this option, but actually this mode may also cause Eynollah being less reliant on available GPU resources.

Without the -light switch, in our observation the (overall much longer) processing times should be roughly doubled (depending on input document image size and features) when no GPU is available.

cneud commented 2 years ago

Looking into this further, despite using the -light switch, there should be a mentionable speed boost with GPU. Our current assumption is that this may be due to CUDA version compatibility issues with tensorflow 1.15.x - however, since the current version of Eynollah can now also use Tensorflow 2, could you perhaps retry with current master and see if there is any speed improvement now?

hasnain095 commented 2 years ago

The issue was resolved after installing CUDA v10. The issue was related a version mismatch between TensorFlow and Cuda version.

cneud commented 2 years ago

Thanks for letting us know! I've also added a short remark on the CUDA version required to the readme now to prevent others from falling into the same pitfalls ;)