Learning kernels that adapt to GPU