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

Check fastmath=True #708

Open
seanlaw opened this issue Nov 7, 2022 · 1 comment
Open

Check fastmath=True #708

seanlaw opened this issue Nov 7, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed refactor

Comments

@seanlaw
Copy link
Contributor

seanlaw commented Nov 7, 2022

In many @njit cases, we use fastmath=True. However, this might be bad when the input arguments and/or output results contain np.nan or np.inf (see Numba fastmath). In those cases, we should use more specific but slower fastmath flags like @njit(fastmath={"nsz", "arcp", "contract", "afn", "reassoc"})

We should spend some time to reassessing whether all of the fastmath specifications are accurate or if they need to be updated

@seanlaw seanlaw added enhancement New feature or request help wanted Extra attention is needed refactor labels Nov 7, 2022
@seanlaw
Copy link
Contributor Author

seanlaw commented Jan 2, 2023

There is a nice article here on some of the differences in the fastmath flags. I wonder if it is possible/might be worth to go down a path where we assume that all njit functions must contain finite inputs/outputs. This will require some further preprocessing of the inputs AND post-processing of the outputs but it might be well worth the effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed refactor
Projects
None yet
Development

No branches or pull requests

1 participant