def METHOD_NAME(test_case, placement, sbp):
    # cudnn only support 4D input, with mode = 'bilinear' && padding_mode = 'zeros' && align_corners
    N = random(1, 3).to(int) * 8
    C = random(1, 3).to(int) * 8
    in_H = random(1, 8).to(int)
    in_W = random(1, 8).to(int)
    out_H = random(1, 8).to(int)
    out_W = random(1, 8).to(int)
    mode = "bilinear"
    padding_mode = "zeros"
    align_corners = True
    theta = random_tensor(ndim=3, dim0=N, dim1=2, dim2=3).to_global(
        placement=placement, sbp=random_sbp(placement, max_dim=1)
    )
    grid = torch.nn.functional.affine_grid(
        theta, (N, C, out_H, out_W), align_corners=align_corners
    )
    input = random_tensor(ndim=4, dim0=N, dim1=C, dim2=in_H, dim3=in_W).to_global(
        placement=placement, sbp=sbp
    )
    output = torch.nn.functional.grid_sample(
        input, grid, mode=mode, padding_mode=padding_mode, align_corners=align_corners,
    )
    return output