7474 skipIfRocm ,
7575 skipIfTorchDynamo ,
7676 subtest ,
77+ TEST_CUDA_MEM_LEAK_CHECK ,
7778 TEST_WITH_TORCHDYNAMO ,
7879 TestCase ,
7980 xfailIfTorchDynamo ,
@@ -2865,6 +2866,10 @@ def fn(x):
28652866 self .assertEqual (actual_jvp , expected_jvp )
28662867
28672868 @dtypes (torch .float )
2869+ @unittest .skipIf (
2870+ TEST_CUDA_MEM_LEAK_CHECK ,
2871+ "Leaking memory, see https://github.com/pytorch/pytorch/pull/150059 for example" ,
2872+ )
28682873 def test_linearize_return (self , device , dtype ):
28692874 x_p = make_tensor ((3 , 1 ), device = device , dtype = dtype )
28702875 x_t = make_tensor ((3 , 1 ), device = device , dtype = dtype )
@@ -2879,6 +2884,10 @@ def fn(x):
28792884 self .assertEqual (actual_jvp , expected_jvp )
28802885
28812886 @dtypes (torch .float )
2887+ @unittest .skipIf (
2888+ TEST_CUDA_MEM_LEAK_CHECK ,
2889+ "Leaking memory, see https://github.com/pytorch/pytorch/pull/150059 for example" ,
2890+ )
28822891 def test_linearize_composition_vmap (self , device , dtype ):
28832892 x_p = make_tensor ((3 , 1 ), device = device , dtype = dtype )
28842893 x_t = make_tensor ((3 , 3 , 1 ), device = device , dtype = dtype )
@@ -2897,6 +2906,10 @@ def jvp_fn(x_t):
28972906 self .assertEqual (actual_batched_jvp , expected_batched_jvp )
28982907
28992908 @dtypes (torch .float )
2909+ @unittest .skipIf (
2910+ TEST_CUDA_MEM_LEAK_CHECK ,
2911+ "Leaking memory, see https://github.com/pytorch/pytorch/pull/150059 for example" ,
2912+ )
29002913 def test_linearize_composition_grad (self , device , dtype ):
29012914 x_p = make_tensor ((3 ,), device = device , dtype = dtype )
29022915 x_t = make_tensor ((3 ,), device = device , dtype = dtype )
@@ -2916,6 +2929,10 @@ def jvp_fn(x_t):
29162929 self .assertEqual (actual_batched_jvp , expected_batched_jvp )
29172930
29182931 @dtypes (torch .float )
2932+ @unittest .skipIf (
2933+ TEST_CUDA_MEM_LEAK_CHECK ,
2934+ "Leaking memory, see https://github.com/pytorch/pytorch/pull/150059 for example" ,
2935+ )
29192936 def test_linearize_nested_input_nested_output (self , device , dtype ):
29202937 x_p = make_tensor ((3 , 1 ), device = device , dtype = dtype )
29212938 x_t = make_tensor ((3 , 1 ), device = device , dtype = dtype )
@@ -5151,6 +5168,10 @@ class TestCompileTransforms(TestCase):
51515168 # torch.compile is not supported on Windows CUDA.
51525169 # Triton only supports GPU with SM70 or later.
51535170 @expectedFailureIf ((IS_WINDOWS and TEST_CUDA ) or (TEST_CUDA and not SM70OrLater ))
5171+ @unittest .skipIf (
5172+ TEST_CUDA_MEM_LEAK_CHECK ,
5173+ "Leaking memory, see https://github.com/pytorch/pytorch/pull/150059 for example" ,
5174+ )
51545175 def test_compile_vmap_hessian (self , device ):
51555176 # The model and inputs are a smaller version
51565177 # of code at benchmark repo:
0 commit comments