-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"DotProductAVX can't be used on Android" while running on Windows #631
Comments
This looks like an error for 32 bit x86 platforms. You can work around it by removing the line |
Thanks, it works! |
Also, one question: will this built tesseract without this line works also on 64-bit Windows OS? |
@Izaron, yes, but it will be much slower. @amitdo, there are several options:
No need to fix this this year – for the rest of the year I have other priorities. Happy new year! |
Not sure if you were joking here or were serious... Happy new year to you too! |
@stweil , |
Yes, sure. You need the compiler option |
https://locklessinc.com/articles/vectorize/ https://monoinfinito.wordpress.com/series/vectorization-in-gcc/
|
There's huge variation of SIMD support even in modern processors. For example I have an Intel CPU purchased in 2016 (Pentium G4400 Skylake) that doesn't support AVX instructions at all. Statistically speaking, most Tesseract users run precompiled binaries. Finally, Tesseract ships on more than 20 hardware platforms for Debian GNU/Linux alone, not to mention all those other operating systems. https://buildd.debian.org/status/package.php?p=tesseract&suite=unstable This is a tough combination. Ideally a binary will uses the fastest SIMD instructions available for the processor, and determines those instructions at runtime rather than at compile time. There's lots of discussion on the web about this, but it is not clear to me what is best practice. |
Yes, binary distributions must support a wide range of hardware and ideally chose the best code at runtime. Nevertheless there is also the need for highly optimized Tesseract installations used for training or mass production of OCR on know hardware. |
The non-SIMD version of the dotproduct method can be significantly sped up by doing manual loop unrolling. |
Also, this version can use OpenMP (with |
Which test scenario do you use? |
Here is one source: |
@stweil I am getting the error while using the new binaries provided by you.
Extracting tessdata components from C:\Users\User\shree\tessdata/vie.traineddata This application has requested the Runtime to terminate it in an unusual way.
|
This is again (or still) a bug for 32 bit Intel platforms. I'll have a look how to fix it later. |
Thanks!
Maybe we should keep this issue 'open'
- excuse the brevity, sent from mobile
On 31-Jan-2017 7:05 PM, "Stefan Weil" <notifications@github.com> wrote:
This is again (or still) a bug for 32 bit Intel platforms. I'll have a look
how to fix it later.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#631 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE2_o29aVPR_pcI7fEuQKMHzJfOyfzF7ks5rXziIgaJpZM4LYhc->
.
|
This issue is addressed by pull request #698. |
@stweil The pull request #698 seems to solve the problem on x86 not entirely; On Windows 7 x64, VS2015, x86 target using the latest tesseract-ocr:master branch (which includes the merged pull request #698) still results in "DotProductAVX can't be used on Android" for me (Intel i7-4650U). However, the workaround in the comment above to remove |
@const-volatile, did you use |
@stweil Ah, I see! Yes, I used cmake - never mind then! |
I still encounter this error "DotProductAVX can't be used on Android" with the latest source from master. I built the .exe in VS2015 with x86 target. It would work with 3.04 language data but throw exceptions when using 4.00 language data. The workaround (commenting out the |
@nguyenq, could you please try replacing Recently support for AVX with 32 bit executables was added, but it needs the above modification to get activated. |
@stweil, I undid the change to I'm not sure if I have AVX support. I run Windows 10 64-bit on i7-7500U CPU. |
Run |
Here is output on my machine:
The shorter variant works! Let me research for how to define a macro in Visual Studio for a C++ project. Do you know, by chance? |
This modification might set
|
It's strange that the macro |
I got the same error when using command line on Ubuntu:
I've never got this error when I set language param as chi_tra or eng. |
@EllenSong77, did you use the latest code? Are you running Ubuntu in a virtual machine (if yes: please provide more information on the kind of virtualisation)? |
@stweil I clone the code yesterday, and running Ubuntu in a physical machine. What other information could be more helpful that I should provide? |
Very strange! |
From where did you get the chi_tra and eng traineddata? |
With the latest code, you should point your tessdata_dir to tessdata/best
…On 17-Aug-2017 10:41 AM, "Amit D." ***@***.***> wrote:
From where did you get the chi_tra and eng traineddata?
From here:
https://github.com/tesseract-ocr/tessdata/tree/3.04.00
Or from here:
https://github.com/tesseract-ocr/tessdata/tree/master/best
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#631 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE2_o5gN3GvgUYBBX6NKL_cYbnaZVL2dks5sY8uYgaJpZM4LYhc->
.
|
@amitdo I got them by command line apt-get install tesseact-ocr-xxx and also cloned from https://github.com/tesseract-ocr/tessdata/tree/master/best |
What repo do you use for Tesseract? |
@stweil A number of tess4j library's users reported that their program cannot load the DLL generated with the compiler option |
Don't use |
That flag is applied at the project level (set in the I just found that I'd appreciate all the help. |
I built my project with cppan and then tried to run, and got an error:
After compiling example project - https://github.com/cppan/tesseract_example/tree/master/with_cppan I got same error. Can you please fix it?
OS: Windows 7
The text was updated successfully, but these errors were encountered: