Fixing caching in CUDA.