Open
Conversation
BrianLii
commented
Feb 9, 2026
Collaborator
|
Please read https://github.com/apache/fory/blob/main/CONTRIBUTING.md#how-to-title-your-pr to update PR title |
Author
Thank you very much for the reference. I tried to update the title, but I did not see the edit option. The edit option looks like this:
reference: This GitHub official tutorial |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Why?
We want to use
bfloat16(BF16) in FDL to reduce payload size while keeping a wide exponent range (common in ML/AI workflows). Fory currently lacks a BF16 primitive and optimized arrays. This PR adds full support forbfloat16in the Fory Go runtime and codegen.What does this PR do?
bfloat16to the IR type system (PrimitiveKind).bfloat16tobfloat16.BFloat16and handle imports.bfloat16.go/fory/bfloat16with a strong typetype BFloat16 uint16.float32andbfloat16(round-to-nearest, ties-to-even).bfloat16,[]bfloat16, and[N]bfloat16, mirroring thefloat16implementation structure.TypeResolverto registerBFloat16,[]BFloat16, and[N]BFloat16types.BFloat16fromuint16(since it's an alias type) for correct serializer selection.Related issues
Fixes #3284
Does this PR introduce any user-facing change?
Benchmark