@@ -35,6 +35,37 @@ def test_all_ops_cpu_half(self):
35
35
config = TensorConfig (device = "cpu" , half_precision = True )
36
36
self ._run_all_ops (config = config , skip_ops = skip_ops )
37
37
38
+ def test_all_ops_cpu_transposed (self ):
39
+ skip_ops = self .SKIP_OPS .copy ()
40
+ # Expected X.is_contiguous(memory_format) to be true, but got false.
41
+ skip_ops += ["native_group_norm.default" ]
42
+ # _pdist_forward requires contiguous input
43
+ skip_ops += ["_pdist_forward.default" ]
44
+ config = TensorConfig (device = "cpu" , transposed = True )
45
+ self ._run_all_ops (config = config , skip_ops = skip_ops )
46
+
47
+ def test_all_ops_cpu_permuted (self ):
48
+ skip_ops = self .SKIP_OPS .copy ()
49
+ # Expected X.is_contiguous(memory_format) to be true, but got false.
50
+ skip_ops += ["native_group_norm.default" ]
51
+ # _pdist_forward requires contiguous input
52
+ skip_ops += ["_pdist_forward.default" ]
53
+ # Unsupported memory format. Supports only ChannelsLast3d, Contiguous
54
+ skip_ops += ["max_pool3d_with_indices.default" ]
55
+ # Unsupported memory format. Supports only ChannelsLast, Contiguous
56
+ skip_ops += ["pixel_shuffle.default" ]
57
+ config = TensorConfig (device = "cpu" , permuted = True )
58
+ self ._run_all_ops (config = config , skip_ops = skip_ops )
59
+
60
+ def test_all_ops_cpu_strided (self ):
61
+ skip_ops = self .SKIP_OPS .copy ()
62
+ # Expected X.is_contiguous(memory_format) to be true, but got false.
63
+ skip_ops += ["native_group_norm.default" ]
64
+ # _pdist_forward requires contiguous input
65
+ skip_ops += ["_pdist_forward.default" ]
66
+ config = TensorConfig (device = "cpu" , strided = True )
67
+ self ._run_all_ops (config = config , skip_ops = skip_ops )
68
+
38
69
39
70
if __name__ == "__main__" :
40
71
unittest .main ()
0 commit comments