[ENHANCEMENT]: Including cuco datastructures declarations for non-CUDA compilers.
Les mainteneurs répondent en général sous 1 jour
@sleeepyjack y travaille déjà.
Depuis le 12/10/2023.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
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.
- Langage dominant
- Cuda
- Étoiles
- 674
- Forks
- 123
- Merge moyen
- 3 j 9 h
- PR mergées (30 j)
- 10
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de NVIDIA/cuCollections
-
Add cuco::detail::stream_sync(cuda::stream_ref) to centralize CCCL version-specific API namingPeut-être à nouveau libre @0z5a l’a pris il y a 29 jours, et aucune pull request n’est ouverte. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
NVIDIA/cuCollections#840 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
nvidia-runners
Difficulté 1/5 1-3 heures Accessibilité débutants 25/100
NVIDIA/cuCollections#853 ·
Les mainteneurs répondent en général sous 1 jour
-
topic: performance type: feature request
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
NVIDIA/cuCollections#817 · 7 commentaires · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
good first issue P2: Nice to have type: improvement
Difficulté 4/5 3-5 jours Accessibilité débutants 38/100
NVIDIA/cuCollections#805 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
[FEA] Add MPSC/MPMC concurrent queuePeut-être à nouveau libre @sleeepyjack l’a pris il y a 268 jours, et aucune pull request n’est ouverte. Ouvertemaintainer-only type: feature request
NVIDIA/cuCollections#791 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour