Free device memory in CUDA/OpenCL runtimes.