Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[FEA] Add option to report hash collisions

Đang mở
#70 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cpp
Lĩnh vực
performance

Hướng nghiên cứu

Bắt đầu trong include/cuco/detail/static_map.inl, quanh đường dẫn no-CG của static_map::find ở dòng 252, sau đó theo dõi các hàm device insert và find khác được đề cập trong issue. Xác định hành vi opt-in để đếm va chạm trên static_map và dynamic_map, đảm bảo số đếm có thể truy cập trên host và bị vô hiệu hóa theo mặc định mà không ảnh hưởng đến hiệu năng tiêu chuẩn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

type: feature request

Is your feature request related to a problem? Please describe.
Hash collisions impact performance of hash map insert and probe. It will be useful to find a way to report the number of collisions for static_map and dynamic_map to help assess performance of insert or probe when developers are evaluating perf on their dataset. It would also allow developers to tune the hash function or occupancy to reduce collisions and find the right balance for their scenario.

Describe the solution you'd like
The map can have an optional template argument that specifies if we need to count collisions (disabled by default), so it's opt-in and doesn't impact perf for the standard case. The number of collisions would be stored in a class variable that's accessible with something like get_num_collisions(). Implementation: allocate memory for device variable uint64_t *d_num_collisions, update all insert and find device code to do atomicAdd(d_num_collisions, 1) to that variable, then copy the contents to the host variable after the kernel. Here is where we can count the collisions for no-CG static_map::find:
https://github.com/NVIDIA/cuCollections/blob/2196040f0562a0280292eebef5295d914f615e63/include/cuco/detail/static_map.inl#L252
The atomic will be guarded by the template argument check, so should only impact perf if we're asked to count collisions. Similarly, would have to update all other insert and find functions.

Describe alternatives you've considered
None.

Additional context
None.

Ngôn ngữ chính
Cuda
Star
671
Fork
122
Merge trung bình
4 ngày 19 giờ
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/cuCollections

Tất cả issue của NVIDIA/cuCollections

Issue tương tự

Thêm issue về Performance

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.