@@ -40,10 +40,12 @@ def test_gen_conv(aggr):
4040 if is_full_test ():
4141 t = '(Tensor, Tensor, OptTensor, Size) -> Tensor'
4242 jit = torch .jit .script (conv .jittable (t ))
43- assert torch .allclose (jit (x1 , edge_index ), out11 )
44- assert torch .allclose (jit (x1 , edge_index , size = (4 , 4 )), out11 )
45- assert torch .allclose (jit (x1 , edge_index , value ), out12 )
46- assert torch .allclose (jit (x1 , edge_index , value , size = (4 , 4 )), out12 )
43+ assert torch .allclose (jit (x1 , edge_index ), out11 , atol = 1e-6 )
44+ assert torch .allclose (jit (x1 , edge_index , size = (4 , 4 )), out11 ,
45+ atol = 1e-6 )
46+ assert torch .allclose (jit (x1 , edge_index , value ), out12 , atol = 1e-6 )
47+ assert torch .allclose (jit (x1 , edge_index , value , size = (4 , 4 )), out12 ,
48+ atol = 1e-6 )
4749
4850 t = '(Tensor, SparseTensor, OptTensor, Size) -> Tensor'
4951 jit = torch .jit .script (conv .jittable (t ))
@@ -71,10 +73,13 @@ def test_gen_conv(aggr):
7173 if is_full_test ():
7274 t = '(OptPairTensor, Tensor, OptTensor, Size) -> Tensor'
7375 jit = torch .jit .script (conv .jittable (t ))
74- assert torch .allclose (jit ((x1 , x2 ), edge_index ), out21 )
75- assert torch .allclose (jit ((x1 , x2 ), edge_index , size = (4 , 2 )), out21 )
76- assert torch .allclose (jit ((x1 , x2 ), edge_index , value ), out22 )
77- assert torch .allclose (jit ((x1 , x2 ), edge_index , value , (4 , 2 )), out22 )
76+ assert torch .allclose (jit ((x1 , x2 ), edge_index ), out21 , atol = 1e-6 )
77+ assert torch .allclose (jit ((x1 , x2 ), edge_index , size = (4 , 2 )), out21 ,
78+ atol = 1e-6 )
79+ assert torch .allclose (jit ((x1 , x2 ), edge_index , value ), out22 ,
80+ atol = 1e-6 )
81+ assert torch .allclose (jit ((x1 , x2 ), edge_index , value , (4 , 2 )), out22 ,
82+ atol = 1e-6 )
7883
7984 t = '(OptPairTensor, SparseTensor, OptTensor, Size) -> Tensor'
8085 jit = torch .jit .script (conv .jittable (t ))
@@ -120,13 +125,14 @@ def test_gen_conv(aggr):
120125 if is_full_test ():
121126 t = '(OptPairTensor, Tensor, OptTensor, Size) -> Tensor'
122127 jit = torch .jit .script (conv .jittable (t ))
123- assert torch .allclose (jit ((x1 , x2 ), edge_index , value ), out1 )
128+ assert torch .allclose (jit ((x1 , x2 ), edge_index , value ), out1 ,
129+ atol = 1e-6 )
124130 assert torch .allclose (jit ((x1 , x2 ), edge_index , value , size = (4 , 2 )),
125- out1 )
131+ out1 , atol = 1e-6 )
126132 assert torch .allclose (jit ((x1 , None ), edge_index , value , size = (4 , 2 )),
127- out2 )
133+ out2 , atol = 1e-6 )
128134
129135 t = '(OptPairTensor, SparseTensor, OptTensor, Size) -> Tensor'
130136 jit = torch .jit .script (conv .jittable (t ))
131- assert torch .allclose (jit ((x1 , x2 ), adj1 .t ()), out1 )
132- assert torch .allclose (jit ((x1 , None ), adj1 .t ()), out2 )
137+ assert torch .allclose (jit ((x1 , x2 ), adj1 .t ()), out1 , atol = 1e-6 )
138+ assert torch .allclose (jit ((x1 , None ), adj1 .t ()), out2 , atol = 1e-6 )
0 commit comments