Hello, The OpenCL runtime allows the programmer to either use in-order command queues or event synchronization to establish producer-consumer dependencies between kernel executions (eg one instance of a kernel reads from an input buffer only after another kernel finishes writing to that buffer).
I want to implement these dependencies at the level of work-groups of kernel instances instead of at the level of kernel calls (eg: instead of kernel X starting after kernel Y finishes, work-group i of kernel X starts after work-group j of kernel Y finishes). In order to compute which work-groups from one kernel depend on which work-groups from another kernel, I want to do the following: - [Compiler] At compile time, analyze kernel code and capture memory access patterns for each kernel, such that for a given work-group ID (NDRange coordinates) it is possible to compute which memory regions from the input/output buffers are going to be accessed. - [Runtime] Check kernel arguments to see if two kernels receive the same buffers as arguments. If so, there is a potential for a producer-consumer dependency between the two kernels. - [Runtime] Given the memory access patterns for two kernels and the buffers they are going to use, compute which work-groups from the consumer kernel depend on which work-groups from the producer kernel. Right now I'm only focusing on the Runtime implementation part. Which steps should I take to implement these features in a clean way, with out modifying the code too much? Thank you for your attention, Pedro Moreira ------------------------------------------------------------------------------ Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk _______________________________________________ pocl-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pocl-devel
