Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add StableHLO complex exponential to stablehlo-complex-math-expander pass #2682

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

pearu
Copy link
Contributor

@pearu pearu commented Jan 3, 2025

As in the title. This PR is created on top of the branch of #2681.

This PR improves the accuracy of JAX complex exp function as follows:

Before
------

test_unary[exp-jax-cpu-complex64-default] maximal ULP difference: 4294967296
ULP difference == 0: 1964868
ULP difference == 1: 133291
ULP difference == 2: 1035
ULP difference == 4294967296: 1606

test_unary[exp-jax-cuda-complex64-default] maximal ULP difference: 4294967296
ULP difference == 0: 1787925
ULP difference == 1: 300591
ULP difference == 2: 10657
ULP difference == 3: 79
ULP difference == 4294967296: 1548

After
-----

test_unary[exp-jax-cpu-complex64-default] maximal ULP difference: 2
ULP difference == 0: 1966101
ULP difference == 1: 133662
ULP difference == 2: 1037

test_unary[exp-jax-cuda-complex64-default] maximal ULP difference: 3
ULP difference == 0: 1788889
ULP difference == 1: 301112
ULP difference == 2: 10720
ULP difference == 3: 79

The corresponding accuracy patterns are available in pearu/functional_algorithms#44 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants