Optimizing for multiple GPU generations