40-Year-Old Rounding Trick Causes Overflow Bugs in Tenstorrent AI Accelerators
A software bug in Tenstorrent's Blackhole and Wormhole AI chips causes the softplus function to return infinity or NaN for large negative inputs, when the mathematically correct answer is approximately zero. The root cause is a decades-old integer rounding technique from 'Hacker's Delight' that silently breaks when the input magnitude exceeds 2^22, a constraint noted in the original text but not enforced in the chip's firmware. The Scalar Functional Processing Unit (SFPU) uses this trick during exponential range reduction, and when the bound is violated, it miscalculates the exponent and produces corrupted floating-point results. The fix involves clamping the intermediate value to a safe threshold before rounding, a pattern already used correctly in other SFPU functions like xielu and gelu. The incident highlights the importance of validating edge cases in hardware-level numerical routines, where silent assumption violations can produce dramatic and costly errors.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in