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 comparators on CUDALongTensor
code: def test_torch_comparators(self) -> None:
      """Test torch comparators on CUDALongTensor"""
      for comp in ["gt", "ge", "lt", "le", "eq", "ne"]:
          tensor = get_random_test_tensor(is_float=False)
          tensor2 = get_random_test_tensor(is_float=False)
  
          t_cuda = CUDALongTensor(tensor)
          t2_cuda = CUDALongTensor(tensor2)
  
          reference = getattr(torch, comp)(tensor, tensor2).long()
          result1 = getattr(t_cuda, comp)(t2_cuda)
          result2 = getattr(torch, comp)(t_cuda, t2_cuda)
  
          self.assertTrue(
              type(result1) == CUDALongTensor,
              "result should be a CUDALongTensor",
          )
          self.assertTrue(
              type(result2) == CUDALongTensor,
              "result should be a CUDALongTensor",
          )
          self._check_int(
              result1.cpu(), reference, "%s comparator failed" % comp
          )
          self._check_int(
              result2.cpu(), reference, "%s comparator failed" % comp
          )
  
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 17 for calling the TestCUDA obj's underlying member method code with example usage: obj.test_torch_comparators() without return types