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

half float #122

Open
vinnitu opened this issue Jul 16, 2019 · 7 comments
Open

half float #122

vinnitu opened this issue Jul 16, 2019 · 7 comments

Comments

@vinnitu
Copy link
Contributor

vinnitu commented Jul 16, 2019

Hello!

What about using half float in data_t?

http://half.sourceforge.net/

@yurymalkov
Copy link
Member

Hi @vinnitu ,
Is it faster to compute compared to 32-bit float AVX?

@vinnitu
Copy link
Contributor Author

vinnitu commented Jul 17, 2019

maybe not faster but more compact footprint in memory I think

@VivianSnow
Copy link

@yurymalkov
https://software.intel.com/en-us/articles/performance-benefits-of-half-precision-floats
"Using half-floats provides a performance benefit over 32-bit floats when 32-bit float data does not fit into the L1 cache."

@vinnitu
Copy link
Contributor Author

vinnitu commented Aug 8, 2019

so, Yury we can do this? I can help you to test

@yurymalkov
Copy link
Member

I can work on this, but somewhat later (too busy this non-programming world issues right now :( ).
If someone is willing to do this earlier, I will find some time to help.

@VivianSnow
Copy link

I can work on this, but what's the best practice for controlling it? Is that add a new member variable in HierarchicalNSW?

@yurymalkov
Copy link
Member

I think the best way to do it is create a new space.
E.g. in a similar way to uint8 type: https://github.com/nmslib/hnswlib/blob/master/hnswlib/space_l2.h#L216

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

3 participants