[ENHANCEMENT]: Including cuco datastructures declarations for non-CUDA compilers.
Maintainer thường phản hồi trong vòng 2 ngày
@sleeepyjack đang làm issue này rồi.
Từ ngày 12/10/2023.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Is your feature request related to a problem? Please describe.
I would like to be able to have a declaration of the cuco datastructures available without having to compile the definition using CUDA so that they can be used in .hpp or .cpp files. At the moment, if you need a forward declaration you need to include all the default template arguments. The compiler doesn't allow redefinition of the default template arguments, even when they are the same as in the .cuh file.
Describe the solution you'd like
Split the .cuh files into .hpp and an .inl. This way one can include either .hpp only for the declarations or .cuh for both the declarations and the definitions.
The .cuh file becomes:
#pragma once
#include <<data_structure>.hpp>
#include <cuco/detail/<data_structure>.inl>
I'm not sure this is that trivial as there may be cuda specific keywords in the declarations like device, device and so on.
Alternatively, the hpp file only contains the highest level declarations + default template value declarations. Then the only change to the current .cuh files would have to be to leave out these defaults in addition to the extra line:
#include <<data_structure>.hpp>
Describe alternatives you've considered
Currently, forward declare the data structure with all its template arguments including those with default values and copy-paste their default values from the .cuh file into your declarations. Obviously, this is not ideal.
Additional context
This is in particular convenient for larger codebases.
Any cpp file that depends on the cuco data structure through nested includes will run into this problem.
- 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
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.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NVIDIA/cuCollections
-
Add cuco::detail::stream_sync(cuda::stream_ref) to centralize CCCL version-specific API namingCó thể làm lại được @0z5a đã nhận 23 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
NVIDIA/cuCollections#840 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
nvidia-runners
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 25/100
NVIDIA/cuCollections#853 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
topic: performance type: feature request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
NVIDIA/cuCollections#817 · 7 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
good first issue P2: Nice to have type: improvement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
NVIDIA/cuCollections#805 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[FEA] Add MPSC/MPMC concurrent queueCó thể làm lại được @sleeepyjack đã nhận 262 ngày trước và không có pull request nào đang mở. Đang mởtype: feature request
NVIDIA/cuCollections#791 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày