| ▲ | koyote 6 hours ago | |
Are there any details around how the round-trip and exchange of data (CPU<->GPU) is implemented in order to not be a big (partially-hidden) performance hit? e.g. this code seems like it would entirely run on the CPU?
But what if we concatenated a number to the string that was calculated on the GPU or if we take a number:
Or maybe I am misunderstanding how this is supposed to work? | ||
| ▲ | kig 4 hours ago | parent | next [-] | |
"We leverage APIs like CUDA streams to avoid blocking the GPU while the host processes requests.", so I'm guessing it would let the other GPU threads go about their lives while that one waits for the ACK from the CPU. I once wrote a prototype async IO runtime for GLSL (https://github.com/kig/glslscript), it used a shared memory buffer and spinlocks. The GPU would write "hey do this" into the IO buffer, then go about doing other stuff until it needed the results, and spinlock to wait for the results to arrive from the CPU. I remember this being a total pain, as you need to be aware of how PCIe DMA works on some level: having your spinlock int written to doesn't mean that the rest of the memory write has finished. | ||
| ▲ | LegNeato 3 hours ago | parent | prev | next [-] | |
We use the cuda device allocator for allocations on the GPU via Rust's default allocator. | ||
| ▲ | zozbot234 6 hours ago | parent | prev [-] | |
Why are you assuming that this is intended to be performant, compared to code that properly segregates the CPU- and GPU-side? It seems clear to me that the latter will be a win. | ||