-
Notifications
You must be signed in to change notification settings - Fork 334
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
Support for other floating point types #1140
Comments
@fzhwenzhou I will ask in the developer meeting tomorrow and report back. |
@fzhwenzhou this depends on the inclusion of compiler-rt -- and once that is done, it'll be a load more work, to the best of my knowledge there are currently no concrete plans for anyone to implement this. We wanted to ask as to what your use-case for these types is and how they can make a difference for you? |
We are implementing a DSL targeting GPUs using LLVM backends, and BF16 is important for various machine learning tasks. In LLVM C++ bindings, we can directly use the data type LLVMBFloatType. However, in llvmlite there is no such data type. A workaround we are adopting is to extract the exponent and fraction part ourselves, use bit operations to construct an integer, and store it into ir.IntType(16). It is not hard actually. Nevertheless, it is neither straightforward nor can it perform any arithmetic operations. Thus, I hope you can add some other floating point types like BF16. Thanks! |
@fzhwenzhou thank you for the update. I have labeld this as a feature request. |
I would love support for FP128 and/or FP80. FP80 would allow numpy.float128 to work in numba for example (it is secretly a long double). They are both already supported in llvm I believe. Currently I have to use pythran instead of numba if I want to use long doubles. |
Feature request
Is there any plan to support other floating point types as LLVM C/C++ bindings support, like bf16, x86 fp80, or fp128? It would be of a great convenience to implement data types like "long double" and "__bf16" in C/C++. Thank you!
The text was updated successfully, but these errors were encountered: