-
Notifications
You must be signed in to change notification settings - Fork 1k
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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 | ||||||
rounded. In particular, some hardware platforms have no direct | ||||||
conversion instructions from f32 to low-precision datatypes (e.g. fp8 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
or fp4), and will perform conversion through an intermediate datatype | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
(e.g. f16/bf16), which may cause [double | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
rounding](https://en.wikipedia.org/wiki/Rounding#Double_rounding). | ||||||
|
||||||
### Rounding mode and denormal handling | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it make sense to place this note to rounding mode section instead? |
||||||
|
||||||
|
There was a problem hiding this comment.
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?