samskalicky commented on a change in pull request #15886: [WIP] Graph Partition 
API
URL: https://github.com/apache/incubator-mxnet/pull/15886#discussion_r314927384
 
 

 ##########
 File path: python/mxnet/symbol/symbol.py
 ##########
 @@ -1437,6 +1437,37 @@ def _gen_atomic_symbol(self):
         return Symbol(handle)
 
 
+    def optimize_for(self, backend, ctx=None, args=None, **kwargs):
+        """Partition symbol and optimize it for a given backend"""
+        out = SymbolHandle()
+        if ctx is not None and args is not None):
+            infer_shape_type = False
+        else:
+            infer_shape_type = True
+            if not isinstance(ctx, Context):
+                raise TypeError("Context type error")
 
 Review comment:
   if you raise an exception here, that means ctx is required argument

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to