Could you post the shapes as well as the min. and max. values for input and grid so that we can reproduce this issue, as this code works fine in float16:
input = torch.arange(4*4).view(1, 1, 4, 4).half().cuda()
print(input)

# Create grid to upsample input
d = torch.linspace(-1, 1, 8)
meshx, meshy = torch.meshgrid((d, d))
grid = torch.stack((meshy, meshx), 2)
grid = grid.unsqueeze(0) # add batch dim
grid = grid.half().cuda()

output = torch.nn.functional.grid_sample(input, grid, mode='bilinear')
print(torch.isfinite(output).all())