3 ms·
> It uses a few mb of contiguous shared memory and periodically calling a function from a host thread. Well, if someone wants to shoot themselves in the head,
by einpoklum 2y ago
> It uses a few mb of contiguous shared memory and periodically calling a function from a host thread.
Well, if someone wants to shoot themselves in the head, then by all means...
> Unless you only want sprintf or similar in which case neither is needed.
> ... Generally you don't want libc calls in numerical kernels doing useful
> stuff - the most common request was for printf as a debugging crutch
I have actually adapted a library for that particular case:
https://github.com/eyalroz/printf/ https://github.com/eyalroz/printf/
I started with a standalone printf-family implementation targetting embedded devices, and (among other things) adapted it for use also with CUDA.
> I mostly wanted mmap.
Does it really make sense to make a gazillion mmap calls from the threads of your GPU kernel? I mean, is it really not always better to mmap on the CPU side? At most, I might do it asynchronously using a CUDA callback or some other mechanism. But I will admit I've not had that use-case.
- rowanG077 2y agoThere is a ton of code that is sections of massive parallelism interspersed with sections of serial non-hot code. It makes total sense to do some syscall then and continue to the next section.