HahTK commented on a change in pull request #17623: Dynamic subgraph compile 
support
URL: https://github.com/apache/incubator-mxnet/pull/17623#discussion_r384225231
 
 

 ##########
 File path: example/extensions/lib_subgraph/test_subgraph.py
 ##########
 @@ -88,3 +91,54 @@
 out4 = sym_block(mx.nd.ones((3,2)),mx.nd.ones((3,2)))
 print(out4)
 
+# Gluon Hybridize partitioning with shapes/types without inference
+print('-------------------------------')
+print('Testing Gluon Hybridize partitioning with shapes/types without 
inference')
+inputs = [a,b]
+sym_block2 = nn.SymbolBlock(sym, inputs)
+sym_block2.initialize()
+sym_block2.optimize_for(mx.nd.ones((3,2)), mx.nd.ones((3,2)), backend='myProp')
+sym_block2.export('partitioned')
+
+
+###############################################
+# Test with subgraph directly consuming params
+###############################################
+# example model, ops to be partitioned have args
+d2 = mx.sym.exp(a)
 
 Review comment:
   I don't understand the goal of this test.
   The point of optimize_for() is to export the partitioned graph without 
running inference.
   Therefore, in the real world use case, the user will only run inference on 
the imported partition.
   
   The test should re-import the partitioned graph and test that right ?
   Testing the sym directly tells us nothing about the success of the 
export/import.
   
   NOTE : There may still be value to testing the sym directly but that is 
secondary to the intended use model

----------------------------------------------------------------
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