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.cat/torch.stack on CUDALongTensor
code: def test_torch_stack_cat(self) -> None:
      """Test torch.cat/torch.stack on CUDALongTensor"""
      funcs = ["stack", "cat"]
  
      tensors = [
          get_random_test_tensor(is_float=False) for _ in range(10)
      ]
      tensors_cuda = [CUDALongTensor(t) for t in tensors]
  
      for op in funcs:
          reference = getattr(torch, op)(tensors)
          result = getattr(CUDALongTensor, op)(tensors_cuda)
  
          self.assertTrue(
              type(result) == CUDALongTensor,
              "result should be a CUDALongTensor",
          )
          self._check_int(
              reference,
              result.cpu(),
              "torch.{} failed for CUDALongTensor".format(op),
          )
  
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 19 for calling the TestCUDA obj's underlying member method code with example usage: obj.test_torch_stack_cat() without return types