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

[BUG] Slot calculation error in static_hash_table.cu #452

Open
Jiaao-Bai opened this issue Jun 14, 2024 · 2 comments
Open

[BUG] Slot calculation error in static_hash_table.cu #452

Jiaao-Bai opened this issue Jun 14, 2024 · 2 comments
Assignees

Comments

@Jiaao-Bai
Copy link

Describe the bug
in gpu_cache/src/static_hash_table.cu, line 117, why slot accumulate again? it seems like slot already in next group before line 117
企业微信截图_89159d0f-506f-4a92-a122-33ecd72b4782

To Reproduce

Expected behavior

Screenshots

Environment (please complete the following information):

Additional context

@Jiaao-Bai
Copy link
Author

if "& (capacity - 1)" clear the lower bits, then step 0 run twice

@RayWang96
Copy link
Collaborator

I'm not the author of this code, but I can give some comments. In my understanding, this is a variant of the linear probing method for hash. Line 117 is used to probe different hash addresses. Since the author assumes that the capacity is a power of 2, "& (capacity - 1)" is equivalent to "% capacity". I don't think the step 0 will run twice, it should probe a different address when the loop continue.

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