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

doc: clarify conversions can be impacted by double-rounding #2361

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion doc/programming_model/data_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ No downconversions are allowed by default, but can be enabled using
the floating-point math controls described in @ref
dev_guide_attributes_fpmath_mode.


The \f$convert_{dst\_dt}\f$ conversion is not guaranteed to be correctly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this be the result of the conversion is not guaranteed to be correctly rounded to the nearest value?

rounded. In particular, some hardware platforms have no direct
conversion instructions from f32 to low-precision datatypes (e.g. fp8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
conversion instructions from f32 to low-precision datatypes (e.g. fp8
conversion instructions to convert f32 data types to low-precision data types such as fp8

or fp4), and will perform conversion through an intermediate datatype
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
or fp4), and will perform conversion through an intermediate datatype
or fp4, and will perform conversion through an intermediate data type

(e.g. f16/bf16), which may cause [double
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(e.g. f16/bf16), which may cause [double
(for example, f16 or bf16), which may result in [double

rounding](https://en.wikipedia.org/wiki/Rounding#Double_rounding).

### Rounding mode and denormal handling

Expand Down
Loading