[ENHANCEMENT]: Including cuco datastructures declarations for non-CUDA compilers.
Los mantenedores suelen responder en 2 días
@sleeepyjack ya está trabajando en esto.
Desde el 12/10/2023.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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.
- Lenguaje dominante
- Cuda
- Estrellas
- 671
- Forks
- 122
- Merge medio
- 4 d 19 h
- PR fusionados (30 d)
- 10
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NVIDIA/cuCollections
-
Add cuco::detail::stream_sync(cuda::stream_ref) to centralize CCCL version-specific API namingQuizá libre de nuevo @0z5a la tomó hace 23 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
NVIDIA/cuCollections#840 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
nvidia-runners
Dificultad 1/5 1-3 horas Aptitud para principiantes 25/100
NVIDIA/cuCollections#853 ·
Los mantenedores suelen responder en 2 días
-
topic: performance type: feature request
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
NVIDIA/cuCollections#817 · 7 comentarios · 1 reacción ·
Los mantenedores suelen responder en 2 días
-
good first issue P2: Nice to have type: improvement
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
NVIDIA/cuCollections#805 · 4 comentarios ·
Los mantenedores suelen responder en 2 días
-
[FEA] Add MPSC/MPMC concurrent queueQuizá libre de nuevo @sleeepyjack la tomó hace 262 días y no hay ningún pull request abierto. Abiertotype: feature request
NVIDIA/cuCollections#791 · 1 asignado ·
Los mantenedores suelen responder en 2 días