def METHOD_NAME(self, cmp_op):
    spec, alt_spec = self.get_gpu_specs()
    st1, st2 = self.get_random_tensors(spec, spec, 10, 10)
    if self.rank == 0:
        torch.nn.init.uniform_(st1.local_shards()[0].tensor)
    self.assertFalse(cmp_op(st1, st2))
    st1 = sharded_tensor.ones(spec, 10, 10)
    st2 = sharded_tensor.ones(spec, 10, 5)
    self.assertFalse(cmp_op(st1, st2))
    st1, st2 = self.get_random_tensors(spec, alt_spec, 10, 10)
    self.assertFalse(cmp_op(st1, st2))
    st1 = sharded_tensor.ones(spec, 10, 10)
    st2 = sharded_tensor.zeros(spec, 10, 10)
    self.assertFalse(cmp_op(st1, st2))
    st1 = sharded_tensor.ones(spec, 10, 10)
    st2 = sharded_tensor.ones(spec, 10, 10, dtype=torch.double)
    self.assertFalse(cmp_op(st1, st2))
    st1 = sharded_tensor.ones(spec, 10, 10)
    st2 = sharded_tensor.ones(spec, 10, 10, requires_grad=True)
    self.assertFalse(cmp_op(st1, st2))
    cpu_spec = ChunkShardingSpec(
        dim=0,
        placements=[
            "rank:0/cpu",
            "rank:1/cpu",
            "rank:2/cpu",
            "rank:3/cpu",
        ],
    )
    st1 = sharded_tensor.ones(cpu_spec, 10, 10)
    st2 = sharded_tensor.ones(cpu_spec, 10, 10, pin_memory=True)
    self.assertFalse(cmp_op(st1, st2))
    pg = dist.new_group([1, 0, 3, 2])
    st1, st2 = self.get_random_tensors(spec, spec, 10, 10, pg2=pg)
    with self.assertRaisesRegex(
        RuntimeError, "All distributed tensors should use the same ProcessGroup"
    ):
        cmp_op(st1, st2)
    pg = dist.new_group([0, 1, 2, 3])
    st1, st2 = self.get_random_tensors(spec, spec, 10, 10, pg2=pg)
    with self.assertRaisesRegex(
        RuntimeError, "All distributed tensors should use the same ProcessGroup"
    ):
        cmp_op(st1, st2)