@@ -47,11 +47,10 @@ def forward(self, x):
4747 y = torch .ops .aten ._to_copy .default (x , dtype = torch .half )
4848 return y
4949
50- inputs = [torch .rand ((1 , 3 , 10 ))]
50+ inputs = [torch .rand ((1 , 3 , 10 ), dtype = torch . half )]
5151 self .run_test (
5252 ToCopyHalf (),
5353 inputs ,
54- precision = torch .half ,
5554 )
5655
5756 def test_to_copy_float (self ):
@@ -60,11 +59,10 @@ def forward(self, x):
6059 y = torch .ops .aten ._to_copy .default (x , dtype = torch .float )
6160 return y
6261
63- inputs = [torch .rand ((1 , 3 , 10 )). half ( )]
62+ inputs = [torch .rand ((1 , 3 , 10 ), dtype = torch . float )]
6463 self .run_test (
6564 ToCopyFloat (),
6665 inputs ,
67- precision = torch .float ,
6866 )
6967
7068 def test_to_copy_bfloat16 (self ):
@@ -74,11 +72,10 @@ def forward(self, x):
7472 y = y ** 2
7573 return y
7674
77- inputs = [torch .rand ((1 , 3 , 10 ), dtype = torch .float32 )]
75+ inputs = [torch .rand ((1 , 3 , 10 ), dtype = torch .bfloat16 )]
7876 self .run_test (
7977 ToCopyBFloat16 (),
8078 inputs ,
81- precision = torch .float ,
8279 )
8380
8481 def test_to_copy_i64b (self ):
@@ -102,11 +99,10 @@ def forward(self, x):
10299 z = torch .ops .aten ._to_copy .default (x_1 , dtype = torch .float )
103100 return y , z
104101
105- inputs = [torch .rand ((1 , 3 , 10 ))]
102+ inputs = [torch .rand ((1 , 3 , 10 ), dtype = torch . float )]
106103 self .run_test (
107104 ToCopyReturns (),
108105 inputs ,
109- precision = torch .float ,
110106 )
111107
112108
0 commit comments