From 117ef3167f028e912412317781882389d0ec9b48 Mon Sep 17 00:00:00 2001 From: Mourad Gouicem Date: Tue, 7 Jan 2025 05:46:10 -0800 Subject: [PATCH] doc: clarify conversions can be impacted by double-rounding --- doc/programming_model/data_types.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/programming_model/data_types.md b/doc/programming_model/data_types.md index e2d10f3786c..5e5e13eb8c8 100644 --- a/doc/programming_model/data_types.md +++ b/doc/programming_model/data_types.md @@ -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 +or fp4), and will perform conversion through an intermediate datatype +(e.g. f16/bf16), which may cause [double +rounding](https://en.wikipedia.org/wiki/Rounding#Double_rounding). ### Rounding mode and denormal handling