def METHOD_NAME(self):
    module = self.Msm1(self.Msm()).cuda()
    replica = dp.replicate(module, {0, 1})
    def assert_share_data(t1, t2):
        # Only checks that they point to the same memory on the same device.
        if t1.device != t2.device:
            return False
        if t1.storage().data_ptr() != t2.storage().data_ptr():
            return False
        return True
    for p1, p2 in zip(module.parameters(), replica[0].parameters()):
        self.assertTrue(assert_share_data(p1, p2))
    for p1, p2 in zip(module.buffers(), replica[0].buffers()):
        self.assertTrue(assert_share_data(p1, p2))
    for p1, p2 in zip(module.parameters(), replica[1].parameters()):
        self.assertFalse(assert_share_data(p1, p2))
    for p1, p2 in zip(module.buffers(), replica[1].buffers()):
        self.assertFalse(assert_share_data(p1, p2))