title: OpenCL global memory
body: <p>My OpenCL kernel requires a few MB of input data, about 300MB of temporary global memory for work, and it returns only a few MB. The only way I know to give the kernel this temporary memory is to allocate this memory with malloc and then pass it with clCreateBuffer, but it takes some time to copy 300MB to GPU and also requires 300MB of host RAM. Is it possible to skip it and either allocate global device memory inside of kernel or somehow declare a buffer with 300Mb but do not create it with malloc and do not copy it to GPU?</p>