Last active
November 12, 2021 11:48
-
-
Save hodgestar/d9e75d369b943a487bc7e2953b4b2ca2 to your computer and use it in GitHub Desktop.
Numpy 1.21.2 np.exp breaking np.linalg.solve on CPUs with AVX512
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# On a CPU with AVX512 extensions and numpy 1.21.2: | |
# (only tested on Ubuntu) | |
import numpy as np | |
a = np.diag([1+0j, 1]) | |
# commenting out the line below makes everything work, with it det returns a nan. | |
# breakpoint() | |
np.exp(0) | |
x = np.linalg.det(a) | |
np.testing.assert_allclose(x, 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment