-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Fix closeness tests in testOnComplexPlane for small inputs. Update expm1 inaccuracy regions. #20144
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
Conversation
|
There are some failures in one of the CI jobs – looks like inf/nan mismatches. |
Yes, I am in a process of fixing these. These emerged because the closeness checking is changed in this PR and the mapping of inaccuracy lists requires updates re the tests that passed false-positively before. |
|
Tests are failing on internal CPU. Overall, I think the issue here is that these tests are too brittle: they make detailed assertions about the dark corners of hardware-dependent implementation details. Rather than add more exceptions for particular backends / package versions / devices / etc. I think it would be better to make the tests simpler and less brittle. What do you think? |
|
|
I agree. I suggest replacing numpy with mpmath as a reference library. |
bb60eca to
67a8a9b
Compare
|
Closing as #20373 has landed. The items in the description will be addressed in follow-up PRs. |
|
@pearu, are the XLA PRs that address the inaccuracies ready for review? That is, are the following PRs ready for review?
|
…te values. Add Cosm1. Imported from GitHub PR openxla/xla#10376 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 42e222a436787c52adf453c8c0c39125b010e2b2 by Pearu Peterson <pearu.peterson@gmail.com>: Fix expm1 inaccuracies on complex inputs with small absolute values. Add Cosm1. Fix expm1(x+yi) when x is large and y is zero. Merging this change closes #10376 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10376 from pearu:pearu/expm1 42e222a436787c52adf453c8c0c39125b010e2b2 PiperOrigin-RevId: 619208374
…te values. Add Cosm1. Imported from GitHub PR openxla/xla#10376 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 42e222a436787c52adf453c8c0c39125b010e2b2 by Pearu Peterson <pearu.peterson@gmail.com>: Fix expm1 inaccuracies on complex inputs with small absolute values. Add Cosm1. Fix expm1(x+yi) when x is large and y is zero. Merging this change closes #10376 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10376 from pearu:pearu/expm1 42e222a436787c52adf453c8c0c39125b010e2b2 PiperOrigin-RevId: 619208374
…te values. Add Cosm1. Imported from GitHub PR openxla/xla#10376 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 42e222a436787c52adf453c8c0c39125b010e2b2 by Pearu Peterson <pearu.peterson@gmail.com>: Fix expm1 inaccuracies on complex inputs with small absolute values. Add Cosm1. Fix expm1(x+yi) when x is large and y is zero. Merging this change closes #10376 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10376 from pearu:pearu/expm1 42e222a436787c52adf453c8c0c39125b010e2b2 PiperOrigin-RevId: 619208374
…te values. Add Cosm1. Imported from GitHub PR #10376 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 42e222a by Pearu Peterson <pearu.peterson@gmail.com>: Fix expm1 inaccuracies on complex inputs with small absolute values. Add Cosm1. Fix expm1(x+yi) when x is large and y is zero. Merging this change closes #10376 COPYBARA_INTEGRATE_REVIEW=#10376 from pearu:pearu/expm1 42e222a PiperOrigin-RevId: 619324160
…te values. Add Cosm1. Imported from GitHub PR openxla/xla#10376 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 42e222a436787c52adf453c8c0c39125b010e2b2 by Pearu Peterson <pearu.peterson@gmail.com>: Fix expm1 inaccuracies on complex inputs with small absolute values. Add Cosm1. Fix expm1(x+yi) when x is large and y is zero. Merging this change closes #10376 PiperOrigin-RevId: 619324160
…te values. Imported from GitHub PR #10503 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 2b8f253 by Pearu Peterson <pearu.peterson@gmail.com>: Fix log1p inaccuracies on complex inputs with large absolute values. -- d35cef4 by Pearu Peterson <pearu.peterson@gmail.com>: Add tests to complex Log1p Merging this change closes #10503 FUTURE_COPYBARA_INTEGRATE_REVIEW=#10503 from pearu:pearu/log1p d35cef4 PiperOrigin-RevId: 620293408
…te values. Imported from GitHub PR openxla/xla#10503 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 2b8f2539d6bf364c0a97f65e186430c5eb3ed07b by Pearu Peterson <pearu.peterson@gmail.com>: Fix log1p inaccuracies on complex inputs with large absolute values. -- d35cef4f5fa09482c49edfee709e86c5ca29adde by Pearu Peterson <pearu.peterson@gmail.com>: Add tests to complex Log1p Merging this change closes #10503 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10503 from pearu:pearu/log1p d35cef4f5fa09482c49edfee709e86c5ca29adde PiperOrigin-RevId: 620293408
…te values. Imported from GitHub PR #10503 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 2b8f253 by Pearu Peterson <pearu.peterson@gmail.com>: Fix log1p inaccuracies on complex inputs with large absolute values. -- d35cef4 by Pearu Peterson <pearu.peterson@gmail.com>: Add tests to complex Log1p Merging this change closes #10503 FUTURE_COPYBARA_INTEGRATE_REVIEW=#10503 from pearu:pearu/log1p d35cef4 PiperOrigin-RevId: 620293408
…te values. Imported from GitHub PR openxla/xla#10503 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 2b8f2539d6bf364c0a97f65e186430c5eb3ed07b by Pearu Peterson <pearu.peterson@gmail.com>: Fix log1p inaccuracies on complex inputs with large absolute values. -- d35cef4f5fa09482c49edfee709e86c5ca29adde by Pearu Peterson <pearu.peterson@gmail.com>: Add tests to complex Log1p Merging this change closes #10503 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10503 from pearu:pearu/log1p d35cef4f5fa09482c49edfee709e86c5ca29adde PiperOrigin-RevId: 620293408
…te values. Imported from GitHub PR #10503 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 2b8f253 by Pearu Peterson <pearu.peterson@gmail.com>: Fix log1p inaccuracies on complex inputs with large absolute values. -- d35cef4 by Pearu Peterson <pearu.peterson@gmail.com>: Add tests to complex Log1p Merging this change closes #10503 FUTURE_COPYBARA_INTEGRATE_REVIEW=#10503 from pearu:pearu/log1p d35cef4 PiperOrigin-RevId: 620293408
…te values. Imported from GitHub PR openxla/xla#10503 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 2b8f2539d6bf364c0a97f65e186430c5eb3ed07b by Pearu Peterson <pearu.peterson@gmail.com>: Fix log1p inaccuracies on complex inputs with large absolute values. -- d35cef4f5fa09482c49edfee709e86c5ca29adde by Pearu Peterson <pearu.peterson@gmail.com>: Add tests to complex Log1p Merging this change closes #10503 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10503 from pearu:pearu/log1p d35cef4f5fa09482c49edfee709e86c5ca29adde PiperOrigin-RevId: 620293408
…te values. Imported from GitHub PR #10503 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 2b8f253 by Pearu Peterson <pearu.peterson@gmail.com>: Fix log1p inaccuracies on complex inputs with large absolute values. -- d35cef4 by Pearu Peterson <pearu.peterson@gmail.com>: Add tests to complex Log1p Merging this change closes #10503 FUTURE_COPYBARA_INTEGRATE_REVIEW=#10503 from pearu:pearu/log1p d35cef4 PiperOrigin-RevId: 621891416
…te values. Imported from GitHub PR openxla/xla#10503 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 2b8f2539d6bf364c0a97f65e186430c5eb3ed07b by Pearu Peterson <pearu.peterson@gmail.com>: Fix log1p inaccuracies on complex inputs with large absolute values. -- d35cef4f5fa09482c49edfee709e86c5ca29adde by Pearu Peterson <pearu.peterson@gmail.com>: Add tests to complex Log1p Merging this change closes #10503 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10503 from pearu:pearu/log1p d35cef4f5fa09482c49edfee709e86c5ca29adde PiperOrigin-RevId: 621891416
…te values. Imported from GitHub PR #10503 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 2b8f253 by Pearu Peterson <pearu.peterson@gmail.com>: Fix log1p inaccuracies on complex inputs with large absolute values. -- d35cef4 by Pearu Peterson <pearu.peterson@gmail.com>: Add tests to complex Log1p Merging this change closes #10503 FUTURE_COPYBARA_INTEGRATE_REVIEW=#10503 from pearu:pearu/log1p d35cef4 PiperOrigin-RevId: 620293408
…te values. Imported from GitHub PR openxla/xla#10503 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 2b8f2539d6bf364c0a97f65e186430c5eb3ed07b by Pearu Peterson <pearu.peterson@gmail.com>: Fix log1p inaccuracies on complex inputs with large absolute values. -- d35cef4f5fa09482c49edfee709e86c5ca29adde by Pearu Peterson <pearu.peterson@gmail.com>: Add tests to complex Log1p Merging this change closes #10503 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10503 from pearu:pearu/log1p d35cef4f5fa09482c49edfee709e86c5ca29adde PiperOrigin-RevId: 620293408
…te values. Imported from GitHub PR #10503 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 2b8f253 by Pearu Peterson <pearu.peterson@gmail.com>: Fix log1p inaccuracies on complex inputs with large absolute values. -- d35cef4 by Pearu Peterson <pearu.peterson@gmail.com>: Add tests to complex Log1p Merging this change closes #10503 COPYBARA_INTEGRATE_REVIEW=#10503 from pearu:pearu/log1p d35cef4 PiperOrigin-RevId: 621917683
…te values. Imported from GitHub PR openxla/xla#10503 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 2b8f2539d6bf364c0a97f65e186430c5eb3ed07b by Pearu Peterson <pearu.peterson@gmail.com>: Fix log1p inaccuracies on complex inputs with large absolute values. -- d35cef4f5fa09482c49edfee709e86c5ca29adde by Pearu Peterson <pearu.peterson@gmail.com>: Add tests to complex Log1p Merging this change closes #10503 PiperOrigin-RevId: 621917683
… absolute values. Add Cosm1. Imported from GitHub PR openxla#10376 As in the title. Tests and improvement reports are in jax-ml/jax#20144. Accuracy tests are enabled in jax-ml/jax#20436 Copybara import of the project: -- 42e222a by Pearu Peterson <pearu.peterson@gmail.com>: Fix expm1 inaccuracies on complex inputs with small absolute values. Add Cosm1. Fix expm1(x+yi) when x is large and y is zero. Merging this change closes openxla#10376 COPYBARA_INTEGRATE_REVIEW=openxla#10376 from pearu:pearu/expm1 42e222a PiperOrigin-RevId: 619324160
As in the title.
openxla/xla#10376 fixes all inaccuracy issues in jax.numpy.expm1:
openxla/xla#10503 fixes all inaccuracy issues in jax.numpy.log1p:
openxla/xla#10525 fixes all inaccuracy issues in jax.numpy.tan: