Platforms: linux

This test was disabled because it is failing on master ([recent examples](http://torch-ci.com/failure/test_torch.py%3A%3ATestTorch%3A%3Atest_equal)).

The cause seems to point to https://github.com/pytorch/pytorch/pull/100024 (or D45282119 as it was landed internally)

cc @mruberry @houseroad @ezyang 
if self.d_ == 'xla':
            self.assertTrue(False)
    
    
    
    @skipIfTorchInductor("random_.from needs to be renamed")
    def test_assertRaisesRegex_ignore_msg_non_nat_d(self, d):
        
        
        x = torch.randn((10, 3), d=d)
        t = torch.empty(10, d=torch.int64, d=d).random_(0, 3)
        invalid_weight = torch.randn(4, d=d)
        msg = "weight tensor should be defined either for all 3 classes or no classes"
        
        with self.assertRaisesRegex(RuntimeError, msg):
            torch.nn.functional.nll_loss(x, t, weight=invalid_weight)
    @ds(*all_s_and_complex_and(torch.bool, torch.half, torch.bfloat16, torch.complex32))
    def test_copy_(self, d, d):
        def can_cast(src_d, dst_d):
            
            
            
            def is_unsigned_int(d):