tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [incubator-tvm] deepakbabel23 commented on a change in pull request #5617: [TENSORFLOW]StatefulPartitionedCall/PartitionedCall Ops support added
Date Thu, 28 May 2020 07:29:45 GMT

deepakbabel23 commented on a change in pull request #5617:

File path: python/tvm/relay/frontend/
@@ -2896,15 +2903,29 @@ def _parse_import_prerequisites(self, graph):
         missing_operators = set()
         for node in graph.node:
+            try:
+                from tensorflow.python.framework import op_def_registry
+            except ImportError as e:
+                raise ImportError(
+                    "Unable to import tensorflow which is required {}".format(e))
+            getOpDef = op_def_registry._registered_ops.get if hasattr(op_def_registry,\
+                        "_registered_ops") else op_def_registry.get
+            op_def = getOpDef(node.op)
             if node.op == "Placeholder" or node.op == 'PlaceholderWithDefault':
             elif node.op == "Const":
+            elif node.op in ["PartitionedCall", "StatefulPartitionedCall"]:
+                pass
                 if any([node.op in t for t in [_identity_list, _convert_map,
+                elif op_def is not None and op_def.is_stateful:
+                    raise Exception("Found a stateful operator in this graph {}. "\

Review comment:
       Yes sure, It will support the aforesaid purpose. You can review once after I handle
this in the new implementation.

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message