-
Notifications
You must be signed in to change notification settings - Fork 49
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
Float16 type support #26
Comments
Thanks for proposing this @BenjaminPoulain . Adding "float16" support makes sense to me. |
Resolution from https://www.w3.org/2020/01/09-webmachinelearning-minutes.html#x04
@huningxin feel free to craft a PR for the group to review. Thanks! |
Agreed with @BenjaminPoulain on the stated benefits of supporting float16 in the API. Models with float16 weights and features have become increasingly popular in real-world use cases especially on the GPU e.g. Nvidia TensorCore in the Pascal or newer generation is specifically float16-based. Float16 is also a primary native data type on most DSP-based AI hardware chips e.g. Intel Movidius. That said, in absence of native support in the underlying hardware, internal simulation such as up-casting the data type on the fly could lead to severe performance penalty and sometimes unexpected computation errors. The API should be designed such that it could fail the operation with unsupported error to allow the client an opportunity to gracefully fallback either by switching to a different target computing device, or to a model variation that simply processes float32 weights and feature sets. |
Put together #35. @BenjaminPoulain @wchao1115 @anssiko , please take a look. Thanks. |
Closing. @huningxin resolved the issue in #35. |
The current spec defines the tensor types "float32", "int32" and "8 bits quantized".
We should consider "float16" for a few reasons:
Implementations without native float16 support should be allowed to use float32 internally. This would help maximizing performance on float32 hardware while keeping things simple for the authors.
The text was updated successfully, but these errors were encountered: