4 ms·
> imagine GPU awk My intuition tells me that awk and other text processing tools won’t scale well to a GPGPU. I might be wrong though. Is there any example of
by _hl_ 7y ago
> imagine GPU awk
My intuition tells me that awk and other text processing tools won’t scale well to a GPGPU. I might be wrong though. Is there any example of something like grep etc working well on a GPU?
- superdimwit 7y agoI agree. I get the sense that a lot of these old text munging tools are seriously fast, and are mostly IO-bound. It would surprise me if moving chunks of text back and forth to a GPU would be very efficient.
- usgroup 7y agoPffff naysayers ... https://www.cs.cmu.edu/afs/cs/academic/class/15418-s12/www/competition/bkase.github.com/CUDA-grep/finalreport.html https://www.cs.cmu.edu/afs/cs/academic/class/15418-s12/www/c...
- _hl_ 7y agoThat's very surprising, assuming they didn't doctor the results by choosing the workload all too carefully. I would have expected a GPU regex too perform much worse, given that regex matching is probably very branchy code. Especially since computation is generally way faster than IO.
- kuzehanka 7y agoModern GPU have no issues with branching.
- reitzensteinm 7y agoWhat specifically are you referring to? Branching on GPUs has not substantially changed for a decade. If all threads on warp skip a branch, it's free. If one takes it, the rest also pay the penalty and mask out the vector units. What's at play here is that the needle in a haystack search of regex is going to spend almost all its time 0 or 1 deep in the state machine, so the threads skip the branches and the penalty is not large.
- ulrikrasmussen 7y agoThere is at least some work on data-parallel string processing which could potentially run on a GPU: https://www.microsoft.com/en-us/research/publication/data-parallel-string-manipulating-programs-2/ https://www.microsoft.com/en-us/research/publication/data-pa...
- KingMachiavelli 7y agoWhen this concept was previously posted on HN, the top comment pointed out how it's the pipes that are inefficient when working on GPUs due to copying data from the CPU to the GPU and vice-versa for each command & pipe pair. I think even if we don't get pipes per se but I think we could expose GPGPU resources in a unix-like way but I suppose it depends on driver support. But as to your question, a lot of traditional tools like grep, sed, aren't really suited for the GPU unless you are running them on a lot of files at once. https://news.ycombinator.com/item?id=5803943 https://news.ycombinator.com/item?id=5803943