Objet : Developers list for StarPU
Archives de la liste
- From: Sylvain HENRY <sylvain.henry@inria.fr>
- To: starpu-devel@lists.gforge.inria.fr
- Subject: Re: [Starpu-devel] StarPU SVN and OpenCL on CPU
- Date: Wed, 23 Feb 2011 20:32:15 +0100
- List-archive: <http://lists.gforge.inria.fr/pipermail/starpu-devel>
- List-id: "Developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>
Hi George, I succeeded in using StarPU with the AMD Stream SDK on CPU but it requires a hack. The problem is that StarPU uses asynchronous data transfers and uses polling (clGetEventInfo(CL_EVENT_COMMAND_EXECUTION_STATUS...)) to know when a transfer is terminated. But it seems that the asynchronous data transfer (i.e. memcpy) is never performed by AMD Stream. A blocking call is required for the transfer to be performed... A first simple solution would be to detect when the worker is an OpenCL CPU device and to somehow force the call to be blocking. The solution I used is different. Because I wanted to avoid the superfluous memcpy, I used an OpenCL buffer created with the flag CL_MEM_USE_HOST_PTR. Each time StarPU wants to transfer data from host memory to the OpenCL CPU device, it calls a function with the source address and the target buffer. This is where I free the buffer and replace it with a new one "mapping" the data. This hack worked for me because I only had OpenCL devices (no CPU worker from a StarPU point of view, only OpenCL ones). With CPU workers, data may get corrupted as we are faking a copy. The long term solution would be for StarPU to consider OpenCL CPU devices as CPU workers, that is, workers performing their computations in host memory (and using CPU cores... but this is another story). Cheers Sylvain Le 23/02/2011 16:46, George Russell a écrit : 4D652BBE.4080908@codeplay.com"> Hi, |
- [Starpu-devel] StarPU SVN and OpenCL on CPU, George Russell, 23/02/2011
- Re: [Starpu-devel] StarPU SVN and OpenCL on CPU, Sylvain HENRY, 23/02/2011
- Re: [Starpu-devel] StarPU SVN and OpenCL on CPU, George Russell, 23/02/2011
- Re: [Starpu-devel] StarPU SVN and OpenCL on CPU, Sylvain HENRY, 24/02/2011
- Re: [Starpu-devel] StarPU SVN and OpenCL on CPU, George Russell, 24/02/2011
- Message indisponible
- Re: [Starpu-devel] StarPU SVN and OpenCL on CPU, Samuel Thibault, 25/02/2011
- Re: [Starpu-devel] StarPU SVN and OpenCL on CPU, Sylvain HENRY, 24/02/2011
- Re: [Starpu-devel] StarPU SVN and OpenCL on CPU, George Russell, 23/02/2011
- Re: [Starpu-devel] StarPU SVN and OpenCL on CPU, Sylvain HENRY, 23/02/2011
Archives gérées par MHonArc 2.6.19+.