code: def test_grid_sample(
      self, N, C, H, H_out, W, W_out, scale, zero_point
  ):
      X = torch.rand(N, C, H, W)
      X_q = torch.quantize_per_tensor(
          X, scale=scale, zero_point=zero_point, dtype=torch.quint8
      )
      grid = torch.rand(N, H_out, W_out, 2)
  
      out = F.grid_sample(X_q, grid)
      out_exp = torch.quantize_per_tensor(
          F.grid_sample(X, grid),
          scale=scale,
          zero_point=zero_point,
          dtype=torch.quint8,
      )
      np.testing.assert_array_almost_equal(
          out.int_repr().numpy(), out_exp.int_repr().numpy(), decimal=0
      )
  
file_path: pytorch/test/quantization/core/test_quantized_functional.py
imports: import torch
  import torch.ao.nn.quantized.functional
  import torch.nn.functional
  import numpy
  from hypothesis import assume, given
  from hypothesis import strategies
  from torch.testing._internal.common_quantization import QuantizationTestCase, _make_conv_test_input
  from torch.testing._internal.common_quantized import override_quantized_engine
  from torch.testing._internal.common_utils import IS_PPC, TEST_WITH_UBSAN
label_desc: Use image node_id 6 for calling the TestQuantizedFunctionalOps obj's underlying member method code with example usage: obj.test_grid_sample(N, C, H, H_out, W, W_out, scale, zero_point) without return types