@@ -297,7 +297,7 @@ class LazyTensorTestCase(RectangularLazyTensorTestCase):
297297 "root_decomposition" : {"rtol" : 0.05 },
298298 "root_inv_decomposition" : {"rtol" : 0.05 , "atol" : 0.02 },
299299 "sample" : {"rtol" : 0.3 , "atol" : 0.3 },
300- "sqrt_inv_matmul" : {"rtol" : 1e-4 , "atol" : 1e-3 },
300+ "sqrt_inv_matmul" : {"rtol" : 1e-2 , "atol" : 1e-3 },
301301 "symeig" : {"double" : {"rtol" : 1e-4 , "atol" : 1e-3 }, "float" : {"rtol" : 1e-3 , "atol" : 1e-2 }},
302302 "svd" : {"rtol" : 1e-4 , "atol" : 1e-3 },
303303 }
@@ -706,7 +706,7 @@ def test_sqrt_inv_matmul(self):
706706 # Perform forward pass
707707 with gpytorch .settings .max_cg_iterations (200 ):
708708 sqrt_inv_matmul_res , inv_quad_res = lazy_tensor .sqrt_inv_matmul (rhs , lhs )
709- evals , evecs = evaluated . symeig ( eigenvectors = True )
709+ evals , evecs = torch . linalg . eigh ( evaluated )
710710 matrix_inv_root = evecs @ (evals .sqrt ().reciprocal ().unsqueeze (- 1 ) * evecs .transpose (- 1 , - 2 ))
711711 sqrt_inv_matmul_actual = lhs_copy @ matrix_inv_root @ rhs_copy
712712 inv_quad_actual = (lhs_copy @ matrix_inv_root ).pow (2 ).sum (dim = - 1 )
@@ -744,7 +744,7 @@ def test_sqrt_inv_matmul_no_lhs(self):
744744 # Perform forward pass
745745 with gpytorch .settings .max_cg_iterations (200 ):
746746 sqrt_inv_matmul_res = lazy_tensor .sqrt_inv_matmul (rhs )
747- evals , evecs = evaluated . symeig ( eigenvectors = True )
747+ evals , evecs = torch . linalg . eigh ( evaluated )
748748 matrix_inv_root = evecs @ (evals .sqrt ().reciprocal ().unsqueeze (- 1 ) * evecs .transpose (- 1 , - 2 ))
749749 sqrt_inv_matmul_actual = matrix_inv_root @ rhs_copy
750750
0 commit comments