-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add bfloat16 based dot and conversion with single/double #2796
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 bfloat16 based dot and conversion with single/double #2796
Conversation
Some more information about the 4 conversion APIs in this PR: |
1. Added bfloat16 based dot as new API: shdot 2. Implemented generic kernel and cooperlake-specific (AVX512-BF16) kernel for shdot 3. Added 4 conversion APIs for bfloat16 data type <=> single/double: shstobf16 shdtobf16 sbf16tos dbf16tod shstobf16 -- convert single float array to bfloat16 array shdtobf16 -- convert double float array to bfloat16 array sbf16tos -- convert bfloat16 array to single float array dbf16tod -- convert bfloat16 array to double float array 4. Implemented generic kernels for all 4 conversion APIs, and cooperlake-specific kernel for shstobf16 and shdtobf16 5. Update level1 thread facilitate functions and macros to support multi-threading for these new APIs 6. Fix Cooperlake platform detection/specify issue when under dynamic-arch building 7. Change the typedef of bfloat16 from unsigned short to more strict uint16_t Signed-off-by: Chen, Guobing <[email protected]>
3e7c5e5
to
deaeb6c
Compare
I'm not sure it's a good idea to call "bfloat16 based dot" as The The proper "half single precision" type is already defined in the IEEE 754-2008 standard: https://en.wikipedia.org/wiki/Half-precision_floating-point_format. This is not the same as bfloat16. Related discussion: #2767. Extract from comment by @mgates3: "... we're proposing to move away from single letter precisions, so likely will never standardize on |
If you are quoting from #2767, you will have seen how the SH.. names came to be. Please comment there if you are not satisfied with Edelsohn's dictum. |
Holding back on this one as it appears to have caused some collateral damage (SIGSEGV in regular single precision) on ppc. |
Anything I can do to help? Unfortunately that I don't have a PPC machine to reproduce. |
Already trying to track it down in the unicamp OpenPOWER minicloud, just wanted to let you know that it has nothing to do with the ongoing discussion about names. |
Well received, thanks much for the information. |
Seems to have been unrelated breakage in my build environment, sorry for the delay. |
shstobf16 -- convert single float array to bfloat16 array
shdtobf16 -- convert double float array to bfloat16 array
sbf16tos -- convert bfloat16 array to single float array
dbf16tod -- convert bfloat16 array to double float array