Talk:Bfloat16 floating-point format

= Error in bit layout illustration =

The file shows the wrong bit indices (first field is 0-7 when it should be 0-6). I tried uploading a newer version with that fixed. It shows up. But the SVG itself is the old version.

Maybe it's because I used the exact same filename. I still believe this behavior is incorrect. Tried changing the filename and reuploading. That version is not even showing up. Now I can't even upload newer versions. Maybe this was flagged for moderation.

I don't know. I give up. Uploading experience is really bad. --nachokb (talk) 09:21, 27 September 2018 (UTC)
 * It seems to be correct, now. I suppose that your issue was due to caching. Vincent Lefèvre (talk) 09:49, 27 September 2018 (UTC)

= History =

It would be good to have a section explaining where this format was introduced and a history of its adoption. — Steven G. Johnson (talk) 20:04, 3 June 2021 (UTC)

Add additional information about rounding

 * Specific text to be added or removed

1. Use Shortened instead of Truncated

To avoid confusion with the rounding mechanism, the first change is to replace “truncated” with “shortened” when it comes to describing bfloat16. “The bfloat16 format, being a shortened IEEE 754 single-precision 32-bit float, …”. In such a way, the text won’t be misunderstood with the truncation rounding in conversion.

2. Add a Format Conversion Section Add a format conversion section to detail the rounding mechanism. The proposed text is as follows:

Rounding and Conversion

The most common use case is the conversion between binary32 and bfloat16. The following section describes the conversion process and its rounding scheme in the conversion. Note that there are other possible scenarios of format conversions to or from bfloat16. For example, int16 and bfloat16.

a. From IEEE754 binary32 (32-bit floating point) to bfloat16

When bfloat16 was first introduced as a storage format, the conversion from IEEE754 binary32 (32-bit floating point) to bfloat16 is truncation (round-to-zero). Later on, when it becomes the input of matrix multiplication units, the conversion can have various rounding mechanisms depending on the hardware platforms. For example, Google TPU uses round-to-nearest-even for Google TPU, the rounding scheme in the conversion is round-to-nearest-even ; ARM uses round-to-nearest-odd  the non-IEEE Round-to-Odd mode. ; for NVIDIA, it supports supports four rounding schemes outlined in IEEE754, including round-to-nearest-even converting float number to bfloat16 precision in round-to-nearest-even mode.

b. From bfloat16 to IEEE754 binary32 (32-bit floating point)

Since IEEE binary32 can represent all exact values in bfloat16, the conversion simply pads 16 zeros in the mantissa bits.


 * Reason for the change: To reflect the recent status that the industry vendors have supported various rounding mechanisms other than truncation.
 * References supporting change: NVIDIA, ARM

2A00:79E1:ABC:12B:BDC7:5327:147A:E174 (talk) 22:09, 18 July 2023 (UTC)

Disclosure: the requestor works at Google, and some content of the edit request is related to Google's product. 2A00:79E1:ABC:12B:BDC7:5327:147A:E174 (talk) 22:09, 18 July 2023 (UTC)

Reply 18-JUL-2019
Your edit request could not be reviewed because the request is not formatted correctly. In the collapsed section below titled Request edit examples, I have illustrated two: The first shows how the edit request was submitted; the second shows how requests should be submitted in the future.
 * 1) The citation style predominantly used by the bfloat16 floating-point format article appears to be Citation Style 1. The citation style used in the edit request consists of bare URL's. Any requested edit of yours which may be implemented will need to resemble the current style already in use in the article – in this case, CS1. (See WP:CITEVAR.)
 * 2) Citation ref tags have not been placed within the requested text indicating which portions of the text the source is referencing. (See WP:INTEGRITY.)
 * 3) The ref note for the Dillon source is only used once, and it is placed in a part of the sentence which confirms no information apart from the fact that bloat16 was once a storage format: "When bloat16 was first introduced as a storage format, ....." The reference entry for Dillon (the only one out of four from the request that uses citation style #1) is also missing the page parameter.
 * 4) One of the web references provided, from Google, confirms 12% of the information provided. The other two web sources do not confirm the text provided. At this link you will see text from two websites The text on the right side of the pane is from the Google source that you provided as a reference. The text on the left side of the pane is from your edit request proposal. Besides the 12% which does match, kindly point out the text from the right side of the pane that matches the text in your proposal on the left side of the pane. The comparison of your edit request proposal with the nvidia source can be viewed here. The comparison of your request"s text with the community.arm source can be viewed here.
 * 5) Significant portions of text have no ref tags.

INCORRECT The Sun's diameter is 864,337.3 miles, while the Moon's diameter is 2,159 miles. The Sun's temperature is 5,778 Kelvin.

In the example above there are three URL's provided with the claim statements, but these URL's have not been placed using Citation Style 1, which is the style predominantly used by the bfloat16 floating-point format article. Additionally, ref tags have not been placed within the text at the exact positions where the information they reference resides. Using the correct style and the correct positioning of the ref tags, the WikiFormatted text should resemble the following:

CORRECT The Sun's diameter is 864,337.3 miles, while the Moon's diameter is 2,159 miles. The Sun's temperature is 5,778 Kelvin. Which displays as: The Sun's diameter is 864,337.3 miles,[1] while the Moon's diameter is 2,159 miles.[2] The Sun's temperature is 5,778 Kelvin.[3]

References

^ Sjöblad, Tristan. . Academic Press, 2020, p. 1. ^ Harinath, Prisha. , Science, 51(78):46. 2020. ^ Uemura, Shū. . Academic Press, 2020, p. 2. 

In the example above the references have been formatted according to Citation Style 1, which shows the author, the source's name, date, etc. Also, the ref tags are placed in the exact location where the text which they reference resides. As Wikipedia is a volunteer project, edit requests such yours are generally expected to have this formatting done before the request is submitted for review.

Kindly rewrite your edit request so that it aligns more with the second example shown in the collapsed section above, and feel free to re-submit that edit request at your earliest convenience. If you have any questions about this formatting please don't hesitate to ask myself or another editor. Regards, Spintendo  22:53, 18 July 2023 (UTC)


 * Thanks for the advices. I've addressed the comments:
 * For #3 regarding the Dillon source, it is also used in the original article, so the final change will be using the already existing citation (and the original article doesn't have the |page= parameter. 2620:15C:2D1:206:95E1:3368:FE14:B48E (talk) 21:24, 19 July 2023 (UTC)
 * @2620:15C:2D1:206:95E1:3368:FE14:B48E Thank you for your reply. To add the information, please provide the source that you stated was already in the article that can be used as a reference for the proposed information here on the talk page. Also, if no page number is provided, please use the quote parameter to give the information from the source that confirms the proposed information here. Thank you! Regards, Spintendo  05:47, 25 July 2023 (UTC)
 * All the references, including the Dillon source, already have the "|quote=" parameter. The information of the Dillon source is also in the quote: "tf.bfloat16 (truncated floating point)". 2620:15C:2D1:206:C5D:D294:1BF7:E3B2 (talk) 16:57, 25 July 2023 (UTC)
 * The Dillon source appears to be available as a pdf (which contains page numbers.) The docs.nvidia.com source also appears to be available in pdf format (with page numbers). The community.arm.com source lists this reference and this reference as its sources. Per WP:SWYGT, if a source is getting its information from another source, both (or just the original) should be listed as the reference of record. That would be preferred to listing community.arm.com, which is a blog. WP:BLOGS states "Self-published expert sources may be considered reliable when produced by an established subject-matter expert, whose work in the relevant field has previously been published by reliable, independent publications". It is not known if Nigel Stephens, the author of the community.arm.com source, fits that description. Regards, Spintendo  23:05, 25 July 2023 (UTC)
 * Add |page= in both the Dillon and the nvidia source.
 * Nigel Stephens is an ARM employee (https://uk.linkedin.com/in/nigelstephens) talking about ARM's product (specific hardware instructions can be found in ARM's product specification). Anyway, the ARM source is updated with the product specification from developer.arm.com. 2620:15C:2D1:206:B191:EE78:6202:30BF (talk) 19:51, 26 July 2023 (UTC)
 * Thank you for your reply. To use Stephens' blog as something coming from an expert, his work in the relevant field would have to of been previously published by reliable, independent publications. Would you know which one's these would be? Also, the information after letter (b) is not referenced. Regards, Spintendo  17:28, 31 July 2023 (UTC)
 * The blog is no longer used. The reference changes to the product specification from developer.arm.com.
 * What is the information after letter (b)? 73.162.81.124 (talk) 19:11, 31 July 2023 (UTC)
 * From your edit request: a. From IEEE754 binary32 (32-bit floating point) to bfloat16. When bfloat16 was first introduced as a storage format, the conversion from IEEE754 binary32 (32-bit floating point) to bfloat16 is truncation (round-to-zero). Later on, when it becomes the input of matrix multiplication units, the conversion can have various rounding mechanisms depending on the hardware platforms. For example, for Google TPU, the rounding scheme in the conversion is round-to-nearest-even ARM uses the non-IEEE Round-to-Odd rounding mode. for NVIDIA, it supports converting float number to bfloat16 precision in round-to-nearest-even mode


 * b. From bfloat16 to IEEE754 binary32 (32-bit floating point)
 * Also, you said the blog is no longer used, the reference changes to the product discussion. It doesn't matter if the blog is no longer used or no longer published by the blogger, It was used as a reference in the request. Also the reference changes references aren't like .gif images that change appearance, they are what they are entered to be. So I'm not entirely sure what that means. Please clarify. Spintendo  07:44, 7 August 2023 (UTC)


 * 1. The reference for (b) is added in the edit request. 2. The reference for the ARM source has been updated: instead of a blog, it is now pointing to a product specification. Since the reference is no longer based on a blog, do I still need to follow guidelines in WP:BLOGS?
 * FYI, the reply button doesn't work anymore, the page asks me to edit directly. — Preceding unsigned comment added by 73.162.81.124 (talk) 17:08, 7 August 2023 (UTC)
 * @73.162.81.124 Where has it been updated? Please note that any changes you make to previous talk page posts of yours need to be following the guidelines according to WP:REDACT. Spintendo  17:54, 7 August 2023 (UTC)
 * thanks for pointing me to the guidelines. I've tried my best to capture the changes in the talk edit request.
 * The talk edit request should have the updated parts now. 2620:15C:2D1:206:2560:20C8:AF:4692 (talk) 17:18, 8 August 2023 (UTC)
 * to clarify: I've tried my best to capture the *past* changes in the talk edit request that otherwise wasn't being captured. 2620:15C:2D1:206:B5D3:2F44:C0C2:7170 (talk) 21:39, 8 August 2023 (UTC)