OpenCL delete data from RAM <p>I'm coping data in python using OpenCL onto my graphic card. There I've a kernel processing the data with n threads. After this step I copy the result back to python and in a new kernel. (The data is very big 900MB and the result is 100MB) With the result I need to calculate triangles which are about 200MB. All data exceed the memory on my graphic card. </p> <p>I do not need the the first 900MB anymore after the first kernel finished it's work.</p> <p>My question is, how can I delete the first dataset (stored in one array) from the graphic card?</p> <p>Here some code:</p> <pre><code>#Write self.gridBuf = cl.Buffer(self.context, cl.mem_flags.READ_ONLY | cl.mem_flags.COPY_HOST_PTR, hostbuf=self.grid) #DO PART 1 ... #Read result cl.enqueue_read_buffer(self.queue, self.indexBuf,index).wait() </code></pre>