2 ms·
It depends on what you’re doing. I’m strongly against moving to GPU just for the sake of it. However, in some cases, where GPU brings substantial performance b
by bayindirh 4y ago
It depends on what you’re doing. I’m strongly against moving to GPU just for the sake of it.
However, in some cases, where GPU brings substantial performance benefits in a long running (hours, days, etc.) application, you can setup pinned memory locations, where they map to GPU. Then you can feed the input part, where it feeds the GPU. If you have multiple DMA engines in the GPU, you can just stream the data from in to GPU to out, and read the results from your second pinned memory location.
If the speed bump is big enough, and you can eat the first startup cost, PCIe cost can become negligible.
However, it’s always horses for courses, and it may not fit your case at all.
In my case, Eigen is already extremely fast for what I do on CPU, and my task doesn’t run long. So adding GPU doubles my wall clock.