class_docstr: This class tests all functions of CUDALongTensor as well as its integration with MPCTensor.
class_docstr_tok: ["This","class","tests","all","functions","of","CUDALongTensor","as","well","as","its","integration","with","MPCTensor","."]
docstr: Test torch.matmul on CUDALongTensor
code: def test_patched_matmul(self) -> None:
      """Test torch.matmul on CUDALongTensor"""
      input_sizes = [
          (5,),
          (5, 5),
          (5,),
          (5, 5),
          (5, 5, 5),
          (5,),
          (5, 5, 5, 5),
          (5, 5),
          # Check large interleaves for 4x16-bit process
          (1, 256),
          (1, 1024),
      ]
      other_sizes = [
          (5,),
          (5, 5),
          (5, 5),
          (5,),
          (5,),
          (5, 5, 5),
          (5, 5),
          (5, 5, 5, 5),
          (256, 1),
          (1024, 1),
      ]
  
      for x_size, y_size in zip(input_sizes, other_sizes):
          x = get_random_test_tensor(
              size=x_size, max_value=2**62, is_float=False
          )
          x_cuda = CUDALongTensor(x)
  
          y = get_random_test_tensor(
              size=y_size, max_value=2**62, is_float=False
          )
          y_cuda = CUDALongTensor(y)
  
          z = torch.matmul(x_cuda, y_cuda)
          self.assertTrue(
              type(z) == CUDALongTensor,
              "result should be a CUDALongTensor",
          )
  
          reference = torch.matmul(x, y)
          self._check_int(
              z.cpu(), reference, "matmul failed for cuda_patches"
          )
  
imports: import collections
  import itertools
  import logging
  import unittest
  import crypten
  import torch
  import torch.nn
  import torch.nn.functional
  from crypten.config import cfg
  from crypten.cuda import CUDALongTensor
  from test.multiprocess_test_case import get_random_test_tensor, MultiProcessTestCase
  from test.test_mpc import TestMPC
label_desc: Use image node_id 3 for calling the TestCUDA obj's underlying member method code with example usage: obj.test_patched_matmul() without return types