Update cuda kernel to smaller size for better performance.