As a side note, I am still having this issue, and I think this inconsistency makes inconsistent in the code runtime, which is very bad in benchmarking.
To reproduce the result:
import torch
import torch.nn.functional as F

%%timeit -n 1000000  # Jupyter
F.interpolate(torch.rand(100, 1, 16, 16).to("cuda").float(), scale_factor=2, mode="nearest")