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

Usage of imprecise fp-model=fast. #360

Open
jbhateja opened this issue Sep 19, 2024 · 1 comment
Open

Usage of imprecise fp-model=fast. #360

jbhateja opened this issue Sep 19, 2024 · 1 comment

Comments

@jbhateja
Copy link

jbhateja commented Sep 19, 2024

With ANN search, we accept giving up accuracy for speed. Since most of the code in jvector_simd.c deals in floating-point computations, it may make sense to pass—fp-model=fast to the GCC compiler at build time. Even though most of the code is directly coded using intrinsics, there should be no harm in passing this option.

With a fast floating point model, the compiler attempts several value-unsafe optimizations[1], like reassociation and parallel reductions (maybe we can replace reduction intrinsics with equivalent C-code and let the compiler do the magic).

Best Regards,
Jatin
[1] https://www.nccs.nasa.gov/images/FloatingPoint_consistency.pdf

@jkni
Copy link
Collaborator

jkni commented Sep 19, 2024

Thanks for the pointer, @jbhateja. I'll look into this.

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

No branches or pull requests

2 participants