[ENHANCEMENT]: Including cuco datastructures declarations for non-CUDA compilers.
I maintainer di solito rispondono entro 2 giorni
@sleeepyjack ci sta già lavorando.
Dal 12/10/2023.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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.
- Lingua principale
- Cuda
- Stelle
- 671
- Fork
- 122
- Merge medio
- 4g 19h
- PR unite (30g)
- 10
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/cuCollections
-
Add cuco::detail::stream_sync(cuda::stream_ref) to centralize CCCL version-specific API namingForse di nuovo libera @0z5a l’ha presa 23 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
NVIDIA/cuCollections#840 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
nvidia-runners
Difficoltà 1/5 1-3 ore Idoneità per principianti 25/100
NVIDIA/cuCollections#853 ·
I maintainer di solito rispondono entro 2 giorni
-
topic: performance type: feature request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
NVIDIA/cuCollections#817 · 7 commenti · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
-
good first issue P2: Nice to have type: improvement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
NVIDIA/cuCollections#805 · 4 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
[FEA] Add MPSC/MPMC concurrent queueForse di nuovo libera @sleeepyjack l’ha presa 262 giorni fa e non c’è nessuna pull request aperta. Apertatype: feature request
NVIDIA/cuCollections#791 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni