Re: [Opengcd-discuss] missing features in gcd/xdispatch
Portable implementation of Grand Central Dispatch
Brought to you by:
mheily
From: Mark H. <ma...@he...> - 2013-02-22 03:20:01
|
On Thu, Feb 21, 2013 at 1:20 AM, David Minor <Dav...@or...>wrote: > Hello Everyone,**** > > I just finished a comparative study of xdispatch , boost::asio, Intel TBB > and c++11 thread constructs. What I did was write multiple implementations > of an OpenCL based data-flow scheduler. As a result of this project I > discovered a few things missing in gcd. **** > > **1. **The ability to get the number of items currently waiting on > a queue. This is important for load-balancing. > **** > > **2. **A way to create thread-specific data. GCD has queue specific > data, but since a queue isn’t bound to a thread it’s not the same thing. I > found this to be important for efficiently doing task parallelism on GPU’s, > where the GPU driver itself can handle multiple streams, but those streams > need to be bound to threads.**** > > **3. **A way to limit the number of threads that a work item can be > dispatched on. This is also relevant to GPU operations, where (at least on > Nvidia) you want a thread per “real” GPU core and a stream (or OpenCL > queue) attached to each core.**** > > ** ** > > My question is whether it is worth my while to make these changes and try > to get them accepted and what is the procedure, forums etc. Where these > issues can be discussed. I don’t want to do this work unless there is some > sort of consensus on acceptance. Considering that Apple is driving GCD, I > don’t expect much of a hearing, but I imagine the xdispatch community would > be more receptive. Some of these issues (like queue size) can only be > resolved at the GCD level, but others could conceivably be implemented as > xdispatch features.**** > > OpenGCD and xdispatch are based on an old version of GCD from MacOS 10.6 (IIRC). There has been some development upstream related to integration with OpenCL: https://developer.apple.com/library/mac/#documentation/Performance/Conceptual/OpenCL_MacProgGuide/UsingGCDwOpenCL/UsingGCDwOpenCL.html#//apple_ref/doc/uid/TP40008312-CH13-SW1 I suggest you start by contacting the libdispatch mailing list and see what they say about these topics. Unfortunately, I have not done anything GPU-related and can't comment on what you are proposing. Regards, - Mark |