File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -995,17 +995,22 @@ def keep(op):
995
995
996
996
schema = op ._schema
997
997
native_schema = _pybind_schema_to_native_schema (schema )
998
- if native_schema . is_mutable :
998
+ if native_schema is None :
999
999
logging .warn (
1000
- f"Op { op } was requested for preservation by partitioner. This request is ignored because it is mutable ."
1000
+ f"Torchgen is not able to parse the schema of { op . _schema } . This is not fatal ."
1001
1001
)
1002
- return False
1002
+ else :
1003
+ if native_schema .is_mutable :
1004
+ logging .warn (
1005
+ f"Op { op } was requested for preservation by partitioner. This request is ignored because it is mutable."
1006
+ )
1007
+ return False
1003
1008
1004
- if native_schema .aliased_return_names () != [None ]:
1005
- logging .warn (
1006
- f"Op { op } was requested for preservation by partitioner. This request is ignored because it aliases output."
1007
- )
1008
- return False
1009
+ if native_schema .aliased_return_names () != [None ]:
1010
+ logging .warn (
1011
+ f"Op { op } was requested for preservation by partitioner. This request is ignored because it aliases output."
1012
+ )
1013
+ return False
1009
1014
1010
1015
# Explicit block list of ops that don't work if asked for
1011
1016
# preservation
You can’t perform that action at this time.
0 commit comments