SShortSingh.
Back to feed

40-Year-Old Rounding Trick Causes Overflow Bugs in Tenstorrent AI Accelerators

0
·1 views

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.

Read the full story at DEV Community

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

Related stories

0
ProgrammingDEV Community ·

How to Fix Podman Image Pull Failures Caused by Zscaler on Windows

Podman on Windows runs Linux containers inside a dedicated Linux/WSL virtual machine that maintains its own certificate trust store, separate from Windows. When Zscaler intercepts HTTPS traffic, the Podman VM does not recognise the Zscaler root CA, causing image pulls to fail even when Windows itself trusts it. The fix involves exporting the Zscaler root certificate from the Windows certificate store using PowerShell, converting it to PEM format, and injecting it into the Podman VM via SSH. Once the certificate is placed under /etc/pki/ca-trust/source/anchors/ and update-ca-trust is run inside the VM, Podman can validate Zscaler-intercepted connections without requiring the insecure --tls-verify=false flag.

0
ProgrammingDEV Community ·

How to Build Async Email Validation in React Without Layout Shifts

A DEV Community article outlines a lightweight React pattern for handling asynchronous email validation without disruptive UI side effects. The author identifies common problems such as layout shifts caused by dynamically rendered error messages, over-reliance on color alone to signal errors, and screen readers failing to announce validation results. The proposed solution models four explicit states — idle, checking, valid, and invalid — to clearly represent what is happening at each stage of the request. A reserved feedback container with a fixed minimum height prevents content from jumping when messages appear, while aria attributes like aria-live, aria-invalid, and aria-describedby ensure accessibility is built into the design. The article emphasizes that the goal is not faster requests but making the validation process visually and semantically transparent to all users.

0
ProgrammingDEV Community ·

Ura Labs launches Midnight pilot to sponsor blockchain transaction fees for app users

Ura Labs has introduced Ura Relay Club, a pilot service on the Midnight Preprod network that sponsors DUST transaction fees on behalf of application users. The service is designed to remove the onboarding barrier where users must hold a separate token balance just to pay network fees. Developers can integrate sponsorship through an API, with their application handling transaction preparation and proving while Ura Relay Club covers fee submission. Access requires project approval and a backend-secured API key, and the pilot operates within configured usage limits. The service is currently restricted to Midnight Preprod and is not yet available on mainnet or other blockchains.

0
ProgrammingDEV Community ·

How to Add Logging, Metrics, and Distributed Tracing to .NET HttpClient

Developers using .NET's IHttpClientFactory can enable built-in HTTP logging by configuring log levels for the System.Net.Http.HttpClient namespace, capturing request and response details at both logical and network levels. For greater control, a custom DelegatingHandler can be built to log request IDs, HTTP methods, status codes, elapsed time, and errors. .NET 8 introduced native metrics support, allowing developers to track request duration and count using IMeterFactory with OpenTelemetry-compatible tags such as HTTP method, host, and status code. These metrics can be exported via OpenTelemetry by registering AddHttpClientInstrumentation alongside ASP.NET Core instrumentation in the application's service configuration. Together, these three pillars — logs, metrics, and traces — give developers comprehensive visibility into outbound HTTP call behavior in production environments.