-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Add framework for implementation of support for AVX512VNNI #3894
base: main
Are you sure you want to change the base?
Conversation
@@ -170,6 +170,14 @@ libtesseract_la_LIBADD += libtesseract_avx512.la | |||
noinst_LTLIBRARIES += libtesseract_avx512.la | |||
endif | |||
|
|||
if HAVE_AVX512VNNI | |||
libtesseract_avx512vnni_la_CXXFLAGS = -mavx512vnni -mavx512vl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curious: what is the use of -mavx512vl
? Should it be checked in configure
, too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not compile without the second flag. It is needed because the code uses ymm registers (256 bit) instead of zmm registers (512 bit).
Yes, we can also add another check in configure.
Note that AFAIK all Intel's CPUs that support AVX512VNNI also support AVXVL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explaining. Maybe we don't need the additional check then.
Ready for testing. I suggest to backup the home directory and any other important stuff, in case this patch will trigger a hard crash (reboot). |
Will it? I cannot test it before August 21 because I currently don't have access to the required hardware. |
I don't think so... |
Stefan, will you able to test the code today or in the upcoming days? |
I just finished a first run of |
Support for sw build is still missing. Therefore CI currently fails. |
This is disappointing. We can also remove the 'ones' vector. The vnni version does not need it. |
Did you fetch and merge my commit locally?
Do you see my commit? |
I removed it locally. But that did not change the generated code. Obviously the compiler also removed it. |
Signed-off-by: Stefan Weil <[email protected]>
This dummy implementation just copied the code from AVX2. Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Stefan Weil <[email protected]>
Do you have access to anther machine (not a notebook) that supports AVX512VNNI ? |
No, I have only sometimes access to a notebook which supports it. |
Using AVX512VNNI instructions is still missing.