Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tanh absolute precision #5206

@petermcneeleychromium

Description

@petermcneeleychromium

Some intrinsic implementations of tanh have low precision. This is found across nvidia directx (4070). It may be across all nvidia. This can easily be seen by running the CTS for tanh on device and is limited to f32.
https://gpuweb.github.io/cts/standalone/?q=webgpu:shader,execution,expression,call,builtin,atanh:*

A polyfill with sinh/cosh appears to be at least 2x slower (on said device).

Based on the data I am suggesting a 1e-5 absolute error be added as acceptable range.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wgslWebGPU Shading Language Issues

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions