Objet : Developers list for StarPU
Archives de la liste
- From: Samuel Thibault <samuel.thibault@ens-lyon.org>
- To: Sylvain HENRY <sylvain.henry@inria.fr>
- Cc: starpu-devel@lists.gforge.inria.fr
- Subject: [Starpu-devel] Avoiding CPU-CPU copy in OpenCL driver case
- Date: Wed, 20 Feb 2013 13:45:52 +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>
Sylvain HENRY, le Wed 30 Jan 2013 18:46:11 +0100, a écrit :
> Anyway if someone has an idea to make this hack work (i.e. avoid data
> transfers on OpenCL CPU devices when there is no CPU worker), I would be
> interested ;-)
>
> >>+ dst_variable->ptr = (uintptr_t)clCreateBuffer(ctx,
> >>CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR, src_variable->elemsize,
> >>(void*)src_variable->ptr,&err);
Wouldn't it work to just change starpu_allocate_buffer_on_node(), to
make it add CL_MEM_USE_HOST_PTR in the case of a CPU OpenCL platform,
and then in copy_data_1_to_1_generic, avoid calling the copy?
I'm however wondering: in the CPU case, are we sure that the OpenCL
platform will not allocate another buffer, but really pass the pointer
as such to the kernel? Otherwise, we have to map/unmap as appropriate
when we want to write from the host, or from the device.
BTW, I thought there was a way to map some host memory into the device
with the assurance that there is no cached copy, but I can't find
that in the standard, only the USE_HOST_PTR flag. Can we assume that
platforms which actually support mapping host memory into the device
would not use a cached copy? Do we know in which cases that is true?
(I'm not saying our use of this would assume that, but I'm saying it can
assume that it happens whenever possible)
Samuel
- [Starpu-devel] Avoiding CPU-CPU copy in OpenCL driver case, Samuel Thibault, 20/02/2013
- Re: [Starpu-devel] Avoiding CPU-CPU copy in OpenCL driver case, Sylvain HENRY, 20/02/2013
- Re: [Starpu-devel] Avoiding CPU-CPU copy in OpenCL driver case, Samuel Thibault, 20/02/2013
- Re: [Starpu-devel] Avoiding CPU-CPU copy in OpenCL driver case, Sylvain HENRY, 20/02/2013
Archives gérées par MHonArc 2.6.19+.