@@ -38,46 +38,6 @@ def test_edge_verifier_check_valid_op_succeed_given_custom_op(self) -> None:
3838 verifier .check_valid_edge_op (edge_op )
3939 verifier .check_valid_op (edge_op )
4040
41- def test_edge_verifier_check_edge_op (self ) -> None :
42- class Model (torch .nn .Module ):
43- def __init__ (self ):
44- super ().__init__ ()
45-
46- def forward (self , x : torch .Tensor ) -> torch .Tensor :
47- return x .transpose (0 , 1 )
48-
49- m = Model ().eval ()
50-
51- example_input = (torch .zeros ([2 , 2 ]),)
52-
53- export_model = export (m , example_input , strict = True )
54-
55- compile_config_without_edge_op = EdgeCompileConfig (
56- _use_edge_ops = False , _skip_dim_order = False
57- )
58-
59- edge_manager = to_edge (
60- export_model , compile_config = compile_config_without_edge_op
61- )
62-
63- normal_verifier = EXIREdgeDialectVerifier ()
64- disable_edge_op_check_verifier = EXIREdgeDialectVerifier (
65- compile_config_without_edge_op
66- )
67-
68- # exported model can not pass normal verifier due to
69- # incontiguous memory layout tensor is not supported in ET
70- with self .assertRaises (SpecViolationError ):
71- normal_verifier (edge_manager .exported_program ())
72-
73- # exported model can pass disable_edge_op_check_verifier due to the
74- # incontiguous memory layout tensor verification is disabled by
75- # compile_config_without_edge_op (_use_edge_ops=False). Noted that this
76- # verifation has been done when calling `to_edge`. Explicitly calling
77- # verifier here just for better demonstration and is unnecessary
78- # in real world for ir verification.
79- disable_edge_op_check_verifier (edge_manager .exported_program ())
80-
8141 def test_edge_verifier_check_valid_dim_order_graph (self ) -> None :
8242 class Model (torch .nn .Module ):
8343 def __init__ (self ):
0 commit comments