From 23c744bf624a6d24298d750bbc39c530c318428d Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Thu, 29 Aug 2024 13:40:16 -0400 Subject: [PATCH] Fix mantissa width for fp64 (#4606) Per https://en.wikipedia.org/wiki/Double-precision_floating-point_format, it should be 52 bits. --- python/triton/language/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/triton/language/core.py b/python/triton/language/core.py index cf86e9296a6a..16b1f2edbbca 100644 --- a/python/triton/language/core.py +++ b/python/triton/language/core.py @@ -378,7 +378,7 @@ def __init__(self, name): self.primitive_bitwidth = 32 self.exponent_bias = 127 elif name == 'fp64': - self.fp_mantissa_width = 53 + self.fp_mantissa_width = 52 self.primitive_bitwidth = 64 self.exponent_bias = 1023 else: