-
Notifications
You must be signed in to change notification settings - Fork 131
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
ERROR: bucket overflow #55
Comments
Could you provide us with a sample code and data that can reproduce this error? Thanks! |
As of now, my program is quite big (involving multiple files) and the error occurs only occasionally. So, I am not in a position to provide simple sample code to reproduce this as of now. Instead, I have tried to narrow this down and this is what I have found so far.
The variable values in that function when the error occurs: C=823, hash_query.shape=([27, 823]) |
I found out the cause of this in the code. When the hash values of the coordinates are evenly distributed, there is no problem. Taking the table_size to be 2 times next power of 2 greater than n, as done in the line above, provides some amount of tolerance for the case where the hash values are not evenly distributed. But, that is only a heuristic. When the hash values are more un-evenly distributed than that, the code fails with the "ERROR: bucket overflow!" messages. |
For the benefit of others running into this, let me mention how I addressed it for now. There used to be the following line in query.cpp:
This way, for larger n, when memory size consideration is more important, the table_size is getting computed to be the same as it used to be. For smaller n, when the effect of uneven distribution of hash values is more pronounced and memory size consideration is not as important, we compute the table_size to be bigger than it used to be, to reduce the chances of bucket overflow error. Original authors: I will submit a pull request with this change. But, I won't be offended :-) if you reject this pull request since this change just reduces the chances of the bucket overflow error and doesn't address the issue in a robust, thorough way. |
@victoryc, thank you so much for investigating this issue! I was discussing with @kentangSJTU this morning about the same solution. I will be happy to take a look after you submit the PR. We are also thinking about making this a knob to tune so that users can change that based on their needs. Take one step further, it might also be possible to dynamically adjust this if there is overflow. |
Hi there, |
Hi @harry1576, it's not in our plan for the near future. As a workaround, you may follow #55 (comment) to enlarge the table size further. |
Please I followed through the suggestions for this issue, but that did not fix it. Is there an alternative solution to this problem. |
I occasionally get the following error for the code that normally works. Any idea what causes this error?
An observation that may or may not be relevant: I noticed that this error seems to occur when the number of coordinates in the sparse tensor is small. The same code ran fine without producing the above error when a bigger input with more coordinates was fed.
The text was updated successfully, but these errors were encountered: