-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add BFloat16 #98643
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
Merged
Merged
Add BFloat16 #98643
Changes from 82 commits
Commits
Show all changes
89 commits
Select commit
Hold shift + click to select a range
589afe0
Add api for BFloat16
huoyaoyuan 312d051
Creating
huoyaoyuan 5e1c981
Equals and GetHashCode
huoyaoyuan 1fb4765
Comparison
huoyaoyuan fc05d3b
Constants and comment
huoyaoyuan 152fe99
Xml doc
huoyaoyuan 25a16e7
Using rounding for cast
huoyaoyuan 50d90aa
Ref source
huoyaoyuan 559f2e0
Simple tests
huoyaoyuan b24839c
Conversion tests
huoyaoyuan 8284526
Stripping sign is redundant
huoyaoyuan 8e32e71
Fix test copied from Half
huoyaoyuan 4bd266e
Fix conversion test cases
huoyaoyuan 6df00e6
Constants and well-known values
huoyaoyuan ff295fd
Categorizing methods
huoyaoyuan 09af2b2
Reorder conversion members
huoyaoyuan 1a8f0ad
Operators batch 1
huoyaoyuan c9fc867
Operators batch 2
huoyaoyuan e9fc0f8
TryConvert
huoyaoyuan c967aa5
Operators batch 3
huoyaoyuan 17c13c0
Parsing and formatting
huoyaoyuan ad780a0
Add comments about how to determine parse and format info
huoyaoyuan c01949f
Add missing interface implementations
huoyaoyuan b63c1df
NumberBufferLength
huoyaoyuan 754a3c8
Add more comment
huoyaoyuan bcc260f
Correct MinFastFloatDecimalExponent
huoyaoyuan 5a3d200
Add explicit conversion to
huoyaoyuan c420dd3
Explicit convert from
huoyaoyuan 13e65d1
Fullfill casting operators
huoyaoyuan 8c5f546
Fullfill some formatting
huoyaoyuan 0cb3932
Apply suggestions from code review
huoyaoyuan b615e68
Merge branch 'main' into BFloat16
huoyaoyuan 8f70d91
Generic DiyFp
huoyaoyuan 2458dd8
Generic Grisu3
huoyaoyuan a8bb94b
Generic Dragon4
huoyaoyuan 9644914
Add MaxRoundTripDigits to MaxPrecisionCustomFormat to FormatInfo
huoyaoyuan a29db5c
Generic FormatFloat
huoyaoyuan a8a8a49
Adapt with existing FP types
huoyaoyuan 2fd392f
Merge branch 'fp-formatting-generic' into BFloat16
huoyaoyuan f1582e7
Adapt formatting traits
huoyaoyuan eace3a6
Use generic format and delete Number.BFloat16
huoyaoyuan abd1e80
Update ref source
huoyaoyuan 62156c9
Merge branch 'main'
huoyaoyuan e8012c9
Enable constant value tests
huoyaoyuan f711f8d
IsFinite/IsNaN
huoyaoyuan 08168ff
IsPositive/IsNegative/IsSubnormal
huoyaoyuan d59a8c5
ToDouble
huoyaoyuan eb6dc47
Merge branch 'main' into BFloat16
huoyaoyuan 25b7684
Merge branch 'main'
huoyaoyuan 832651e
Merge branch 'main' into BFloat16
huoyaoyuan a07fe96
Fix test case
huoyaoyuan f9c35d3
Add double conversion test
huoyaoyuan 4059b66
Parse tests
huoyaoyuan 4b4d1a5
Formatting tests
huoyaoyuan 6ed52f5
RoundTripping tests
huoyaoyuan 14b0d85
Port float->Half conversion algorithm to double->BFloat16 to handle U…
huoyaoyuan ea1dd5f
Port function tests from Half
huoyaoyuan dfd49c8
Convert the precesion of test cases.
huoyaoyuan f5461ac
Merge branch 'main' into BFloat16
danmoseley daaec69
Merge branch 'main' into BFloat16
huoyaoyuan 9938e8b
Align with TryWriteBig/LittleEndian
huoyaoyuan b889417
Remove redundant 'partial'
huoyaoyuan 1282c85
Merge branch 'main' into BFloat16
tannergooding e6dd118
Merge branch 'main' into BFloat16
huoyaoyuan 922f411
Use DefaultParseStyle
huoyaoyuan 86dce2d
Fill conversion in signed integer
huoyaoyuan 9f729a3
Fill conversion in unsigned integer and floating point
huoyaoyuan 6baf940
Add conversion for S.R.Numerics
huoyaoyuan fb88f8e
Use float member function instead of MathF
huoyaoyuan d697344
Fill conversion in decimal
huoyaoyuan 4e83ad9
Add conversion for NFloat
huoyaoyuan d58c80a
Use soft rounding for uint->bf16
huoyaoyuan 8639fa3
Generic math rounding from unsigned and signed integer
huoyaoyuan 34b1d07
Cleanup helper methods
huoyaoyuan 8adbeb2
Add integer rounding tests
huoyaoyuan 1f2653f
Move helpers and fix comment
huoyaoyuan 9046622
Update comment
huoyaoyuan c372590
Merge branch 'main'
huoyaoyuan 5302790
Fix ILogB
huoyaoyuan 317400d
Merge branch 'main' into BFloat16
jeffhandley 4fabff9
Merge branch 'main' into BFloat16
huoyaoyuan 5549afa
Merge branch 'main' into BFloat16
tannergooding a071699
Apply suggestions from code review
huoyaoyuan 1a7e65a
Move conversion interface to BFloat16
huoyaoyuan 3268b4a
Add missing conversion to Half
huoyaoyuan 87fb85f
Remove NFloat conversion
huoyaoyuan a8111e4
Tune CreateSingle/CreateDouble
huoyaoyuan f1f7ca7
Adjust constant naming
huoyaoyuan 2acf213
Use <summary> for math expression
huoyaoyuan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.