Skip to content
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

fp8 and bfloat16 support #923

Open
lostmsu opened this issue Feb 3, 2023 · 4 comments
Open

fp8 and bfloat16 support #923

lostmsu opened this issue Feb 3, 2023 · 4 comments
Labels
feature A new feature (or feature request)

Comments

@lostmsu
Copy link
Contributor

lostmsu commented Feb 3, 2023

NVidia actually has two variants of fp8 with different sizes of mantissa/exponent. bfloat16 is also unique. There's also TensorFloat32 which is really more like bfloat19. Perhaps it would make sense to have float<SizeOfMantissa, SizeOfExponent> generic type (hackery).

@MoFtZ MoFtZ added the feature A new feature (or feature request) label Feb 3, 2023
@MoFtZ
Copy link
Collaborator

MoFtZ commented Feb 3, 2023

It looks like Cuda provides a few alternate floating point options, including bf16 and tf32.

This would have to be a Cuda only feature, as there is no equivalent in OpenCL 2.0.

We already have support for Half. Would we add support for BFloat16 and TensorFloat32 types? @m4rs-mt

@lostmsu
Copy link
Contributor Author

lostmsu commented Feb 3, 2023

@MoFtZ that's why it might make sense to have the generic-sized float type as I mentioned, with boolean guards. E.g. bool Accelerator.SupportsType(...) function, which would let user choose a different kernel.

@m4rs-mt
Copy link
Owner

m4rs-mt commented Feb 7, 2023

@lostmsu @MoFtZ I think this makes sense to add given that NVIDIA GPUs can take serious advantage of these types. I wonder how we can make this happen in a convenient way. Let's get into more detail on Thursday in our talk-to-dev session.

@MoFtZ
Copy link
Collaborator

MoFtZ commented Apr 26, 2023

Based on our last discussions, this is more broadly related to adding support for the Cuda WMMA (Warp Level Matrix Multiply-Accumulate Instructions); adding support for the fp8 and bfloat16 types is not very useful without WMMA support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature (or feature request)
Projects
None yet
Development

No branches or pull requests

3 participants